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