Browse Source

Chop long titles in library update notification, fix incrementing when updating covers

arkon 3 years ago
parent
commit
117fd4bd0f

+ 1 - 1
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))

+ 1 - 1
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(),