Fix cancel and isDownloading

Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
alperozturk 2024-01-11 10:53:58 +01:00 committed by Alper Öztürk
parent 3b2824e80e
commit 2a0b754449

View file

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