Fixed downloading pending forever if we canceled it from notification

This commit is contained in:
MohitMali 2023-07-19 14:08:11 +05:30
parent 8a105ae296
commit 842a7ee737

View File

@ -101,7 +101,7 @@ class FetchDownloadNotificationManager(private val context: Context) :
.addAction(
R.drawable.fetch_notification_cancel,
context.getString(R.string.cancel),
getActionPendingIntent(downloadNotification, DownloadNotification.ActionType.CANCEL)
getActionPendingIntent(downloadNotification, DownloadNotification.ActionType.DELETE)
)
downloadNotification.isPaused ->
notificationBuilder.setTimeoutAfter(getNotificationTimeOutMillis())
@ -113,7 +113,7 @@ class FetchDownloadNotificationManager(private val context: Context) :
.addAction(
R.drawable.fetch_notification_cancel,
context.getString(R.string.cancel),
getActionPendingIntent(downloadNotification, DownloadNotification.ActionType.CANCEL)
getActionPendingIntent(downloadNotification, DownloadNotification.ActionType.DELETE)
)
downloadNotification.isQueued ->
notificationBuilder.setTimeoutAfter(getNotificationTimeOutMillis())