mirror of
https://github.com/mihonapp/mihon.git
synced 2025-06-27 03:27:51 +02:00
Add option to hide missing chapter count (#2108)
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
This commit is contained in:
@ -31,6 +31,7 @@ The format is a modified version of [Keep a Changelog](https://keepachangelog.co
|
||||
- Surface image loading error in Reader ([@AwkwardPeak7](https://github.com/AwkwardPeak7)) ([#1981](https://github.com/mihonapp/mihon/pull/1981))
|
||||
- Include source headers when opening failed images from reader ([@AwkwardPeak7](https://github.com/AwkwardPeak7)) ([#2004](https://github.com/mihonapp/mihon/pull/2004))
|
||||
- Added autofill support to tracker login dialog ([@AntsyLich](https://github.com/AntsyLich)) ([#2069](https://github.com/mihonapp/mihon/pull/2069))
|
||||
- Added option to hide missing chapter count ([@User826](https://github.com/User826), [@AntsyLich](https://github.com/AntsyLich)) ([#2108](https://github.com/mihonapp/mihon/pull/2108))
|
||||
|
||||
### Changed
|
||||
- Display all similarly named duplicates in duplicate manga dialogue ([@NarwhalHorns](https://github.com/NarwhalHorns), [@AntsyLich](https://github.com/AntsyLich)) ([#1861](https://github.com/mihonapp/mihon/pull/1861))
|
||||
|
@ -256,6 +256,10 @@ object SettingsLibraryScreen : SearchableSettings {
|
||||
),
|
||||
title = stringResource(MR.strings.pref_mark_duplicate_read_chapter_read),
|
||||
),
|
||||
Preference.PreferenceItem.SwitchPreference(
|
||||
preference = libraryPreferences.hideMissingChapters(),
|
||||
title = stringResource(MR.strings.pref_hide_missing_chapter_indicators),
|
||||
),
|
||||
),
|
||||
)
|
||||
}
|
||||
|
@ -230,6 +230,7 @@ class MangaScreenModel(
|
||||
excludedScanlators = getExcludedScanlators.await(mangaId),
|
||||
isRefreshingData = needRefreshInfo || needRefreshChapter,
|
||||
dialog = null,
|
||||
hideMissingChapters = libraryPreferences.hideMissingChapters().get(),
|
||||
)
|
||||
}
|
||||
|
||||
@ -1126,6 +1127,7 @@ class MangaScreenModel(
|
||||
val isRefreshingData: Boolean = false,
|
||||
val dialog: Dialog? = null,
|
||||
val hasPromptedToAddBefore: Boolean = false,
|
||||
val hideMissingChapters: Boolean = false,
|
||||
) : State {
|
||||
val processedChapters by lazy {
|
||||
chapters.applyFilters(manga).toList()
|
||||
@ -1136,6 +1138,10 @@ class MangaScreenModel(
|
||||
}
|
||||
|
||||
val chapterListItems by lazy {
|
||||
if (hideMissingChapters) {
|
||||
return@lazy processedChapters
|
||||
}
|
||||
|
||||
processedChapters.insertSeparators { before, after ->
|
||||
val (lowerChapter, higherChapter) = if (manga.sortDescending()) {
|
||||
after to before
|
||||
|
@ -175,6 +175,7 @@ class LibraryPreferences(
|
||||
|
||||
fun autoClearChapterCache() = preferenceStore.getBoolean("auto_clear_chapter_cache", false)
|
||||
|
||||
fun hideMissingChapters() = preferenceStore.getBoolean("pref_hide_missing_chapter_indicators", false)
|
||||
// endregion
|
||||
|
||||
// region Swipe Actions
|
||||
|
@ -317,6 +317,8 @@
|
||||
<string name="pref_mark_duplicate_read_chapter_read_existing">After reading a chapter</string>
|
||||
<string name="pref_mark_duplicate_read_chapter_read_new">After fetching new chapter</string>
|
||||
|
||||
<string name="pref_hide_missing_chapter_indicators">Hide missing chapter indicators</string>
|
||||
|
||||
<!-- Extension section -->
|
||||
<string name="multi_lang">Multi</string>
|
||||
<string name="ext_updates_pending">Updates pending</string>
|
||||
|
Reference in New Issue
Block a user