Skip to content

Commit

Permalink
no need to use decrypted remote path for isDownloading
Browse files Browse the repository at this point in the history
Signed-off-by: alperozturk <[email protected]>
  • Loading branch information
alperozturk96 committed Jan 24, 2025
1 parent dbe58c9 commit 4cbf251
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class FileDownloadHelper {
return FileDownloadWorker.isDownloading(
user.accountName,
file.fileId
) || SyncWorker.isDownloading(file.decryptedRemotePath)
) || SyncWorker.isDownloading(file)
}

fun cancelPendingOrCurrentDownloads(user: User?, files: List<OCFile>?) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ class SyncWorker(
/**
* It is used to add the sync icon next to the file in the folder.
*/
fun isDownloading(path: String): Boolean {
return downloadingFiles.any { it.decryptedRemotePath == path }
fun isDownloading(file: OCFile): Boolean {
return downloadingFiles.contains(file)
}
}

Expand Down

0 comments on commit 4cbf251

Please sign in to comment.