From 909c730bde0cb965b23c3301d0e0bf555ebac3a9 Mon Sep 17 00:00:00 2001 From: alperozturk Date: Fri, 12 Jan 2024 08:56:20 +0100 Subject: [PATCH] Remove unused parameter Signed-off-by: alperozturk --- .../client/files/downloader/FileDownloadWorker.kt | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/com/nextcloud/client/files/downloader/FileDownloadWorker.kt b/app/src/main/java/com/nextcloud/client/files/downloader/FileDownloadWorker.kt index 9253f849331e..b45e50ea49cc 100644 --- a/app/src/main/java/com/nextcloud/client/files/downloader/FileDownloadWorker.kt +++ b/app/src/main/java/com/nextcloud/client/files/downloader/FileDownloadWorker.kt @@ -271,8 +271,6 @@ class FileDownloadWorker( return } - val fileName = currentDownload?.file?.fileName - setWorkerState(user) Log_OC.e(TAG, "FilesDownloadWorker downloading: $downloadKey") @@ -299,7 +297,7 @@ class FileDownloadWorker( Log_OC.e(TAG, "Error downloading", e) downloadResult = RemoteOperationResult(e) } finally { - cleanupDownloadProcess(downloadResult, fileName) + cleanupDownloadProcess(downloadResult) } } @@ -337,9 +335,9 @@ class FileDownloadWorker( return file } - private fun cleanupDownloadProcess(result: RemoteOperationResult<*>?, fileName: String?) { + private fun cleanupDownloadProcess(result: RemoteOperationResult<*>?) { result?.let { - checkDownloadError(it, fileName) + checkDownloadError(it) } val removeResult = pendingDownloads.removePayload( @@ -362,7 +360,7 @@ class FileDownloadWorker( } } - private fun checkDownloadError(result: RemoteOperationResult<*>, fileName: String?) { + private fun checkDownloadError(result: RemoteOperationResult<*>) { if (result.isSuccess || downloadError != null) { return }