fixup! DownloadWorker: Only update appropriate status field on status change
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
@@ -307,6 +307,7 @@ class DownloadWorker @AssistedInject constructor(
|
|||||||
private suspend fun notifyStatus(status: DownloadStatus, dID: Int = -1) {
|
private suspend fun notifyStatus(status: DownloadStatus, dID: Int = -1) {
|
||||||
// Update database for all status except downloading which is handled onProgress
|
// Update database for all status except downloading which is handled onProgress
|
||||||
if (status != DownloadStatus.DOWNLOADING) {
|
if (status != DownloadStatus.DOWNLOADING) {
|
||||||
|
download.downloadStatus = status
|
||||||
downloadDao.updateStatus(download.packageName, status)
|
downloadDao.updateStatus(download.packageName, status)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user