mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-21 20:47:03 -05:00
Show number of categories in setting summary
This commit is contained in:
parent
e58896bdfb
commit
04d7eccc63
2 changed files with 8 additions and 0 deletions
|
@ -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())
|
||||
}
|
||||
|
|
|
@ -186,6 +186,10 @@
|
|||
<string name="pref_category_library_categories">Categories</string>
|
||||
<string name="default_category">Default category</string>
|
||||
<string name="default_category_summary">Always ask</string>
|
||||
<plurals name="num_categories">
|
||||
<item quantity="one">%d category</item>
|
||||
<item quantity="other">%d categories</item>
|
||||
</plurals>
|
||||
<string name="pref_library_update_categories">Categories to include in global update</string>
|
||||
<string name="all">All</string>
|
||||
|
||||
|
|
Loading…
Reference in a new issue