From 842a7ee737be3e45dfd6b4e39cde1b1abd1afbcf Mon Sep 17 00:00:00 2001 From: MohitMali Date: Wed, 19 Jul 2023 14:08:11 +0530 Subject: [PATCH] Fixed downloading pending forever if we canceled it from notification --- .../core/downloader/fetch/FetchDownloadNotificationManager.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/org/kiwix/kiwixmobile/core/downloader/fetch/FetchDownloadNotificationManager.kt b/core/src/main/java/org/kiwix/kiwixmobile/core/downloader/fetch/FetchDownloadNotificationManager.kt index 3ed296c19..da5e9b7b7 100644 --- a/core/src/main/java/org/kiwix/kiwixmobile/core/downloader/fetch/FetchDownloadNotificationManager.kt +++ b/core/src/main/java/org/kiwix/kiwixmobile/core/downloader/fetch/FetchDownloadNotificationManager.kt @@ -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())