mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
fix: Dismiss failed download notification before retrying
This commit is contained in:
parent
fe666b614f
commit
33a84f7e39
2 changed files with 6 additions and 1 deletions
|
@ -610,6 +610,11 @@ class NotificationReceiver : BroadcastReceiver() {
|
|||
)
|
||||
}
|
||||
|
||||
internal fun dismissFailThenStartAppUpdatePendingJob(context: Context, url: String, notifyOnInstall: Boolean = false): PendingIntent {
|
||||
dismissNotification(context, Notifications.ID_UPDATER_FAILED)
|
||||
return startAppUpdatePendingJob(context, url, notifyOnInstall)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns [PendingIntent] that cancels the download for a Tachiyomi update
|
||||
*
|
||||
|
|
|
@ -233,7 +233,7 @@ internal class AppUpdateNotifier(private val context: Context) {
|
|||
addAction(
|
||||
R.drawable.ic_refresh_24dp,
|
||||
context.getString(MR.strings.retry),
|
||||
NotificationReceiver.startAppUpdatePendingJob(context, url),
|
||||
NotificationReceiver.dismissFailThenStartAppUpdatePendingJob(context, url),
|
||||
)
|
||||
// Cancel action
|
||||
addAction(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue