mirror of
https://github.com/mihonapp/mihon.git
synced 2025-06-27 11:37: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))
|
- 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))
|
- 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 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
|
### 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))
|
- 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),
|
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),
|
excludedScanlators = getExcludedScanlators.await(mangaId),
|
||||||
isRefreshingData = needRefreshInfo || needRefreshChapter,
|
isRefreshingData = needRefreshInfo || needRefreshChapter,
|
||||||
dialog = null,
|
dialog = null,
|
||||||
|
hideMissingChapters = libraryPreferences.hideMissingChapters().get(),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1126,6 +1127,7 @@ class MangaScreenModel(
|
|||||||
val isRefreshingData: Boolean = false,
|
val isRefreshingData: Boolean = false,
|
||||||
val dialog: Dialog? = null,
|
val dialog: Dialog? = null,
|
||||||
val hasPromptedToAddBefore: Boolean = false,
|
val hasPromptedToAddBefore: Boolean = false,
|
||||||
|
val hideMissingChapters: Boolean = false,
|
||||||
) : State {
|
) : State {
|
||||||
val processedChapters by lazy {
|
val processedChapters by lazy {
|
||||||
chapters.applyFilters(manga).toList()
|
chapters.applyFilters(manga).toList()
|
||||||
@ -1136,6 +1138,10 @@ class MangaScreenModel(
|
|||||||
}
|
}
|
||||||
|
|
||||||
val chapterListItems by lazy {
|
val chapterListItems by lazy {
|
||||||
|
if (hideMissingChapters) {
|
||||||
|
return@lazy processedChapters
|
||||||
|
}
|
||||||
|
|
||||||
processedChapters.insertSeparators { before, after ->
|
processedChapters.insertSeparators { before, after ->
|
||||||
val (lowerChapter, higherChapter) = if (manga.sortDescending()) {
|
val (lowerChapter, higherChapter) = if (manga.sortDescending()) {
|
||||||
after to before
|
after to before
|
||||||
|
@ -175,6 +175,7 @@ class LibraryPreferences(
|
|||||||
|
|
||||||
fun autoClearChapterCache() = preferenceStore.getBoolean("auto_clear_chapter_cache", false)
|
fun autoClearChapterCache() = preferenceStore.getBoolean("auto_clear_chapter_cache", false)
|
||||||
|
|
||||||
|
fun hideMissingChapters() = preferenceStore.getBoolean("pref_hide_missing_chapter_indicators", false)
|
||||||
// endregion
|
// endregion
|
||||||
|
|
||||||
// region Swipe Actions
|
// 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_existing">After reading a chapter</string>
|
||||||
<string name="pref_mark_duplicate_read_chapter_read_new">After fetching new 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 -->
|
<!-- Extension section -->
|
||||||
<string name="multi_lang">Multi</string>
|
<string name="multi_lang">Multi</string>
|
||||||
<string name="ext_updates_pending">Updates pending</string>
|
<string name="ext_updates_pending">Updates pending</string>
|
||||||
|
Reference in New Issue
Block a user