fix isDownloading logic

Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
alperozturk 2024-12-12 13:39:26 +01:00 committed by Alper Öztürk
parent d4d7f60f2c
commit 805858aa78

View file

@ -47,11 +47,10 @@ class FileDownloadHelper {
return false return false
} }
return if (file.isFolder) { return FileDownloadWorker.isDownloading(
SyncWorker.isDownloading(file.decryptedRemotePath) user.accountName,
} else { file.fileId
FileDownloadWorker.isDownloading(user.accountName, file.fileId) ) || SyncWorker.isDownloading(file.decryptedRemotePath)
}
} }
fun cancelPendingOrCurrentDownloads(user: User?, files: List<OCFile>?) { fun cancelPendingOrCurrentDownloads(user: User?, files: List<OCFile>?) {