From 117fd4bd0fe0be3d1f14f8fba736a813332730a0 Mon Sep 17 00:00:00 2001 From: arkon Date: Wed, 14 Jul 2021 17:59:09 -0400 Subject: [PATCH] Chop long titles in library update notification, fix incrementing when updating covers --- .../eu/kanade/tachiyomi/data/library/LibraryUpdateNotifier.kt | 2 +- .../eu/kanade/tachiyomi/data/library/LibraryUpdateService.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 c4da5421c..0db4f301a 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 @@ -74,7 +74,7 @@ class LibraryUpdateNotifier(private val context: Context) { .setContentTitle(context.getString(R.string.notification_check_updates)) .setContentText("($current/$total)") } else { - val updatingText = manga.joinToString("\n") { "• ${it.title}" } + val updatingText = manga.joinToString("\n") { it.title.chop(40) } progressNotificationBuilder .setContentTitle(context.getString(R.string.notification_updating, current, total)) .setStyle(NotificationCompat.BigTextStyle().bigText(updatingText)) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateService.kt b/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateService.kt index 8f1c06ce0..5c0e191ba 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateService.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateService.kt @@ -416,7 +416,6 @@ class LibraryUpdateService( } currentlyUpdatingManga.add(manga) - progressCount.andIncrement notifier.showProgressNotification( currentlyUpdatingManga, progressCount.get(), @@ -440,6 +439,7 @@ class LibraryUpdateService( } currentlyUpdatingManga.remove(manga) + progressCount.andIncrement notifier.showProgressNotification( currentlyUpdatingManga, progressCount.get(),