Add option to force ascending sort on gallery versions
This commit is contained in:
parent
c4df7b496b
commit
f46c42f522
@ -196,4 +196,6 @@ object PreferenceKeys {
|
|||||||
const val eh_aggressivePageLoading = "eh_aggressive_page_loading"
|
const val eh_aggressivePageLoading = "eh_aggressive_page_loading"
|
||||||
|
|
||||||
const val eh_hl_useHighQualityThumbs = "eh_hl_hq_thumbs"
|
const val eh_hl_useHighQualityThumbs = "eh_hl_hq_thumbs"
|
||||||
|
|
||||||
|
const val eh_forceSortEhVersionsAsc = "eh_force_sort_eh_versions_asc"
|
||||||
}
|
}
|
||||||
|
@ -269,4 +269,6 @@ class PreferencesHelper(val context: Context) {
|
|||||||
fun eh_aggressivePageLoading() = rxPrefs.getBoolean(Keys.eh_aggressivePageLoading, false)
|
fun eh_aggressivePageLoading() = rxPrefs.getBoolean(Keys.eh_aggressivePageLoading, false)
|
||||||
|
|
||||||
fun eh_hl_useHighQualityThumbs() = rxPrefs.getBoolean(Keys.eh_hl_useHighQualityThumbs, false)
|
fun eh_hl_useHighQualityThumbs() = rxPrefs.getBoolean(Keys.eh_hl_useHighQualityThumbs, false)
|
||||||
|
|
||||||
|
fun eh_forceSortEhVersionsAsc() = rxPrefs.getBoolean(Keys.eh_forceSortEhVersionsAsc, true)
|
||||||
}
|
}
|
||||||
|
@ -446,7 +446,8 @@ class ChaptersPresenter(
|
|||||||
* Whether the sorting method is descending or ascending.
|
* Whether the sorting method is descending or ascending.
|
||||||
*/
|
*/
|
||||||
fun sortDescending(): Boolean {
|
fun sortDescending(): Boolean {
|
||||||
return manga.sortDescending()
|
return !((source.id == EH_SOURCE_ID || source.id == EXH_SOURCE_ID)
|
||||||
|
&& preferences.eh_forceSortEhVersionsAsc().getOrDefault()) && manga.sortDescending()
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -156,6 +156,12 @@ class SettingsEhController : SettingsController() {
|
|||||||
onChange { preferences.imageQuality().reconfigure() }
|
onChange { preferences.imageQuality().reconfigure() }
|
||||||
}.dependency = PreferenceKeys.eh_enableExHentai
|
}.dependency = PreferenceKeys.eh_enableExHentai
|
||||||
|
|
||||||
|
switchPreference {
|
||||||
|
title = "Force ascending sort on gallery versions"
|
||||||
|
key = PreferenceKeys.eh_forceSortEhVersionsAsc
|
||||||
|
defaultValue = true
|
||||||
|
}
|
||||||
|
|
||||||
preferenceCategory {
|
preferenceCategory {
|
||||||
title = "Favorites sync"
|
title = "Favorites sync"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user