From 04d7eccc63baf2794d91d4fc4674030b5e51705d Mon Sep 17 00:00:00 2001 From: arkon Date: Sat, 2 May 2020 10:47:21 -0400 Subject: [PATCH] Show number of categories in setting summary --- .../kanade/tachiyomi/ui/setting/SettingsLibraryController.kt | 4 ++++ app/src/main/res/values/strings.xml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsLibraryController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsLibraryController.kt index f33d9a239..abfa286d8 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsLibraryController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsLibraryController.kt @@ -171,6 +171,10 @@ class SettingsLibraryController : SettingsController() { preference { titleRes = R.string.action_edit_categories + + val catCount = db.getCategories().executeAsBlocking().size + summary = context.resources.getQuantityString(R.plurals.num_categories, catCount, catCount) + onClick { router.pushController(CategoryController().withFadeTransaction()) } diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index aa9435701..65bf5ae51 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -186,6 +186,10 @@ Categories Default category Always ask + + %d category + %d categories + Categories to include in global update All