From bfb0d31ff61a6609cdf8ca421d08cbb4236fc5af Mon Sep 17 00:00:00 2001 From: arkon Date: Tue, 26 Dec 2023 13:13:33 -0500 Subject: [PATCH] Remove skipped updates notification Seems to cause more confusion than it's worth. Will update the UI for the library update skip options to better explain what they're for later. --- .../settings/screen/SettingsDataScreen.kt | 2 +- .../data/library/LibraryUpdateJob.kt | 1 - .../data/library/LibraryUpdateNotifier.kt | 22 ------------------- .../data/notification/Notifications.kt | 8 +------ .../commonMain/resources/MR/base/strings.xml | 2 -- 5 files changed, 2 insertions(+), 33 deletions(-) diff --git a/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsDataScreen.kt b/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsDataScreen.kt index 752031c740..46b37c9e89 100644 --- a/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsDataScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsDataScreen.kt @@ -208,7 +208,7 @@ object SettingsDataScreen : SearchableSettings { val cacheReadableSize = remember(cacheReadableSizeSema) { chapterCache.readableSize } return Preference.PreferenceGroup( - title = stringResource(MR.strings.label_data), + title = stringResource(MR.strings.pref_storage_usage), preferenceItems = persistentListOf( Preference.PreferenceItem.CustomPreference( title = stringResource(MR.strings.pref_storage_usage), diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateJob.kt b/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateJob.kt index 7e0f899662..c7a714a012 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateJob.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateJob.kt @@ -235,7 +235,6 @@ class LibraryUpdateJob(private val context: Context, workerParams: WorkerParamet .map { (reason, entries) -> "$reason: [${entries.map { it.first.title }.sorted().joinToString()}]" } .joinToString() } - notifier.showUpdateSkippedNotification(skippedUpdates.size) } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateNotifier.kt b/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateNotifier.kt index b1fdfd414e..06d61589db 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateNotifier.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateNotifier.kt @@ -139,27 +139,6 @@ class LibraryUpdateNotifier(private val context: Context) { } } - /** - * Shows notification containing update entries that were skipped. - * - * @param skipped Number of entries that were skipped during the update. - */ - fun showUpdateSkippedNotification(skipped: Int) { - if (skipped == 0) { - return - } - - context.notify( - Notifications.ID_LIBRARY_SKIPPED, - Notifications.CHANNEL_LIBRARY_SKIPPED, - ) { - setContentTitle(context.stringResource(MR.strings.notification_update_skipped, skipped)) - setContentText(context.stringResource(MR.strings.learn_more)) - setSmallIcon(R.drawable.ic_tachi) - setContentIntent(NotificationHandler.openUrl(context, HELP_SKIPPED_URL)) - } - } - /** * Shows the notification containing the result of the update done by the service. * @@ -385,4 +364,3 @@ class LibraryUpdateNotifier(private val context: Context) { private const val NOTIF_MAX_CHAPTERS = 5 private const val NOTIF_TITLE_MAX_LEN = 45 private const val NOTIF_ICON_SIZE = 192 -private const val HELP_SKIPPED_URL = "https://tachiyomi.org/docs/faq/library#why-is-global-update-skipping-entries" 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 3a76b045d4..7632d06db4 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 @@ -30,8 +30,6 @@ object Notifications { const val ID_LIBRARY_SIZE_WARNING = -103 const val CHANNEL_LIBRARY_ERROR = "library_errors_channel" const val ID_LIBRARY_ERROR = -102 - const val CHANNEL_LIBRARY_SKIPPED = "library_skipped_channel" - const val ID_LIBRARY_SKIPPED = -104 /** * Notification channel and ids used by the downloader. @@ -86,6 +84,7 @@ object Notifications { "updates_ext_channel", "downloader_cache_renewal", "crash_logs_channel", + "library_skipped_channel", ) /** @@ -132,11 +131,6 @@ object Notifications { setGroup(GROUP_LIBRARY) setShowBadge(false) }, - buildNotificationChannel(CHANNEL_LIBRARY_SKIPPED, IMPORTANCE_LOW) { - setName(context.stringResource(MR.strings.channel_skipped)) - setGroup(GROUP_LIBRARY) - setShowBadge(false) - }, buildNotificationChannel(CHANNEL_NEW_CHAPTERS, IMPORTANCE_DEFAULT) { setName(context.stringResource(MR.strings.channel_new_chapters)) }, diff --git a/i18n/src/commonMain/resources/MR/base/strings.xml b/i18n/src/commonMain/resources/MR/base/strings.xml index 15edcdd381..3e4c686083 100644 --- a/i18n/src/commonMain/resources/MR/base/strings.xml +++ b/i18n/src/commonMain/resources/MR/base/strings.xml @@ -830,7 +830,6 @@ Chapter %1$s and %2$d more Chapters %1$s %1$d update(s) failed - %1$d update(s) skipped Tap to learn more Failed to update cover Please add the entry to your library before doing this @@ -896,7 +895,6 @@ Progress Complete Errors - Skipped Chapter updates App updates Extension updates