fixup! DownloadWorker: Only update appropriate status field on status change

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
Aayush Gupta
2024-02-17 15:36:09 +05:30
parent 295f7decfa
commit 94f724ee66

View File

@@ -307,6 +307,7 @@ class DownloadWorker @AssistedInject constructor(
private suspend fun notifyStatus(status: DownloadStatus, dID: Int = -1) {
// Update database for all status except downloading which is handled onProgress
if (status != DownloadStatus.DOWNLOADING) {
download.downloadStatus = status
downloadDao.updateStatus(download.packageName, status)
}