From d8e748111836dad781659f4d34c74a429c853c0d Mon Sep 17 00:00:00 2001 From: arkon Date: Tue, 21 Apr 2020 19:17:55 -0400 Subject: [PATCH] Fix backup/restore notification channel --- .../kanade/tachiyomi/data/notification/Notifications.kt | 9 ++++++--- .../kanade/tachiyomi/ui/setting/backup/BackupNotifier.kt | 2 +- app/src/main/res/values/strings.xml | 1 + 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/notification/Notifications.kt b/app/src/main/java/eu/kanade/tachiyomi/data/notification/Notifications.kt index 1f4e751783..819344c4ba 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/notification/Notifications.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/notification/Notifications.kt @@ -48,7 +48,7 @@ object Notifications { /** * Notification channel and ids used by the backup/restore system. */ - const val CHANNEL_BACKUP = "backup_channel" + const val CHANNEL_BACKUP_RESTORE = "backup_restore_channel" const val ID_BACKUP = -501 /** @@ -73,8 +73,11 @@ object Notifications { NotificationChannel(CHANNEL_NEW_CHAPTERS, context.getString(R.string.channel_new_chapters), NotificationManager.IMPORTANCE_DEFAULT), NotificationChannel(CHANNEL_UPDATES_TO_EXTS, context.getString(R.string.channel_ext_updates), - NotificationManager.IMPORTANCE_DEFAULT - ) + NotificationManager.IMPORTANCE_DEFAULT), + NotificationChannel(CHANNEL_BACKUP_RESTORE, context.getString(R.string.channel_backup_restore), + NotificationManager.IMPORTANCE_LOW).apply { + setShowBadge(false) + } ) context.notificationManager.createNotificationChannels(channels) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/backup/BackupNotifier.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/backup/BackupNotifier.kt index 6cca68cbe8..a72cde3763 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/backup/BackupNotifier.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/backup/BackupNotifier.kt @@ -10,7 +10,7 @@ import eu.kanade.tachiyomi.util.system.notificationManager internal class BackupNotifier(private val context: Context) { - private val notificationBuilder = context.notificationBuilder(Notifications.CHANNEL_DOWNLOADER) { + private val notificationBuilder = context.notificationBuilder(Notifications.CHANNEL_BACKUP_RESTORE) { setLargeIcon(BitmapFactory.decodeResource(context.resources, R.mipmap.ic_launcher)) } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 8a85f65d0d..5410371a06 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -610,5 +610,6 @@ Downloader Chapter updates Extension updates + Backup and restore