From f9fec74ffd20ba4e302d13a9e80795e2b2e11dc5 Mon Sep 17 00:00:00 2001 From: len Date: Thu, 30 Mar 2017 20:02:48 +0200 Subject: [PATCH] Add short description to library update notification --- .../eu/kanade/tachiyomi/data/library/LibraryUpdateService.kt | 5 ++++- app/src/main/res/values/strings.xml | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) 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 8b6c61eff..6ccc28098 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 @@ -380,7 +380,6 @@ class LibraryUpdateService( * @param updates a list of manga with new updates. */ private fun showResultNotification(updates: List) { - val title = getString(R.string.notification_new_chapters) val newUpdates = updates.map { it.title.chop(45) }.toMutableSet() // Append new chapters from a previous, existing notification @@ -398,10 +397,14 @@ class LibraryUpdateService( } } + val title = getString(R.string.notification_new_chapters) + val text = getString(R.string.notification_new_chapters_text, newUpdates.size) + notificationManager.notify(Constants.NOTIFICATION_LIBRARY_RESULT_ID, notification { setSmallIcon(R.drawable.ic_book_white_24dp) setLargeIcon(notificationBitmap) setContentTitle(title) + setContentText(text) setStyle(NotificationCompat.BigTextStyle().bigText(newUpdates.joinToString("\n"))) setContentIntent(getNotificationIntent()) setAutoCancel(true) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index f2c72db0f..93b31880d 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -340,6 +340,7 @@ Update progress: %1$d/%2$d New chapters found + For %1$d titles Failed to update cover Please add the manga to your library before doing this Sync canceled