Skip to content

Commit

Permalink
Remove unused parameter
Browse files Browse the repository at this point in the history
Signed-off-by: alperozturk <[email protected]>
  • Loading branch information
alperozturk96 committed Jan 12, 2024
1 parent 95e9be6 commit 909c730
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,6 @@ class FileDownloadWorker(
return
}

val fileName = currentDownload?.file?.fileName

setWorkerState(user)
Log_OC.e(TAG, "FilesDownloadWorker downloading: $downloadKey")

Expand All @@ -299,7 +297,7 @@ class FileDownloadWorker(
Log_OC.e(TAG, "Error downloading", e)
downloadResult = RemoteOperationResult<Any?>(e)
} finally {
cleanupDownloadProcess(downloadResult, fileName)
cleanupDownloadProcess(downloadResult)
}
}

Expand Down Expand Up @@ -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(
Expand All @@ -362,7 +360,7 @@ class FileDownloadWorker(
}
}

private fun checkDownloadError(result: RemoteOperationResult<*>, fileName: String?) {
private fun checkDownloadError(result: RemoteOperationResult<*>) {
if (result.isSuccess || downloadError != null) {
return
}
Expand Down

0 comments on commit 909c730

Please sign in to comment.