Remove ability to hide unread chapter badges in library
This commit is contained in:
parent
0861c5618c
commit
68345e636e
@ -56,8 +56,6 @@ class LibraryPreferences(
|
||||
|
||||
fun localBadge() = preferenceStore.getBoolean("display_local_badge", true)
|
||||
|
||||
fun unreadBadge() = preferenceStore.getBoolean("display_unread_badge", true)
|
||||
|
||||
fun languageBadge() = preferenceStore.getBoolean("display_language_badge", false)
|
||||
|
||||
fun newShowUpdatesCount() = preferenceStore.getBoolean("library_show_updates_count", true)
|
||||
|
@ -332,7 +332,6 @@ class LibraryScreenModel(
|
||||
private fun getLibraryItemPreferencesFlow(): Flow<ItemPreferences> {
|
||||
return combine(
|
||||
libraryPreferences.downloadBadge().changes(),
|
||||
libraryPreferences.unreadBadge().changes(),
|
||||
libraryPreferences.localBadge().changes(),
|
||||
libraryPreferences.languageBadge().changes(),
|
||||
|
||||
@ -345,15 +344,14 @@ class LibraryScreenModel(
|
||||
transform = {
|
||||
ItemPreferences(
|
||||
downloadBadge = it[0] as Boolean,
|
||||
unreadBadge = it[1] as Boolean,
|
||||
localBadge = it[2] as Boolean,
|
||||
languageBadge = it[3] as Boolean,
|
||||
globalFilterDownloaded = it[4] as Boolean,
|
||||
filterDownloaded = it[5] as Int,
|
||||
filterUnread = it[6] as Int,
|
||||
filterStarted = it[7] as Int,
|
||||
filterBookmarked = it[8] as Int,
|
||||
filterCompleted = it[9] as Int,
|
||||
localBadge = it[1] as Boolean,
|
||||
languageBadge = it[2] as Boolean,
|
||||
globalFilterDownloaded = it[3] as Boolean,
|
||||
filterDownloaded = it[4] as Int,
|
||||
filterUnread = it[5] as Int,
|
||||
filterStarted = it[6] as Int,
|
||||
filterBookmarked = it[7] as Int,
|
||||
filterCompleted = it[8] as Int,
|
||||
)
|
||||
},
|
||||
)
|
||||
@ -377,7 +375,7 @@ class LibraryScreenModel(
|
||||
} else {
|
||||
0
|
||||
}
|
||||
unreadCount = if (prefs.unreadBadge) libraryManga.unreadCount else 0
|
||||
unreadCount = libraryManga.unreadCount
|
||||
isLocal = if (prefs.localBadge) libraryManga.manga.isLocal() else false
|
||||
sourceLanguage = if (prefs.languageBadge) {
|
||||
sourceManager.getOrStub(libraryManga.manga.source).lang
|
||||
@ -707,7 +705,6 @@ class LibraryScreenModel(
|
||||
@Immutable
|
||||
private data class ItemPreferences(
|
||||
val downloadBadge: Boolean,
|
||||
val unreadBadge: Boolean,
|
||||
val localBadge: Boolean,
|
||||
val languageBadge: Boolean,
|
||||
|
||||
|
@ -351,17 +351,15 @@ class LibrarySettingsSheet(
|
||||
|
||||
inner class BadgeGroup : Group {
|
||||
private val downloadBadge = Item.CheckboxGroup(R.string.action_display_download_badge, this)
|
||||
private val unreadBadge = Item.CheckboxGroup(R.string.action_display_unread_badge, this)
|
||||
private val localBadge = Item.CheckboxGroup(R.string.action_display_local_badge, this)
|
||||
private val languageBadge = Item.CheckboxGroup(R.string.action_display_language_badge, this)
|
||||
|
||||
override val header = Item.Header(R.string.badges_header)
|
||||
override val items = listOf(downloadBadge, unreadBadge, localBadge, languageBadge)
|
||||
override val items = listOf(downloadBadge, localBadge, languageBadge)
|
||||
override val footer = null
|
||||
|
||||
override fun initModels() {
|
||||
downloadBadge.checked = libraryPreferences.downloadBadge().get()
|
||||
unreadBadge.checked = libraryPreferences.unreadBadge().get()
|
||||
localBadge.checked = libraryPreferences.localBadge().get()
|
||||
languageBadge.checked = libraryPreferences.languageBadge().get()
|
||||
}
|
||||
@ -371,7 +369,6 @@ class LibrarySettingsSheet(
|
||||
item.checked = !item.checked
|
||||
when (item) {
|
||||
downloadBadge -> libraryPreferences.downloadBadge().set((item.checked))
|
||||
unreadBadge -> libraryPreferences.unreadBadge().set((item.checked))
|
||||
localBadge -> libraryPreferences.localBadge().set((item.checked))
|
||||
languageBadge -> libraryPreferences.languageBadge().set((item.checked))
|
||||
else -> {}
|
||||
|
@ -107,7 +107,6 @@
|
||||
<string name="action_display_list">List</string>
|
||||
<string name="action_display_cover_only_grid">Cover-only grid</string>
|
||||
<string name="action_display_download_badge">Downloaded chapters</string>
|
||||
<string name="action_display_unread_badge">Unread chapters</string>
|
||||
<string name="action_display_local_badge">Local source</string>
|
||||
<string name="action_display_language_badge">Language</string>
|
||||
<string name="action_display_show_tabs">Show category tabs</string>
|
||||
|
Loading…
Reference in New Issue
Block a user