mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-24 02:01:51 +01:00
Show "shift double pages" as default enabled in settings on for tablets
This commit is contained in:
parent
3b23a95985
commit
05558f5733
@ -8,6 +8,7 @@ import eu.kanade.tachiyomi.ui.reader.ReaderActivity
|
||||
import eu.kanade.tachiyomi.ui.reader.viewer.ViewerNavigation
|
||||
import eu.kanade.tachiyomi.ui.reader.viewer.pager.PageLayout
|
||||
import eu.kanade.tachiyomi.util.lang.addBetaTag
|
||||
import eu.kanade.tachiyomi.util.system.isTablet
|
||||
import eu.kanade.tachiyomi.util.view.activityBinding
|
||||
import kotlinx.coroutines.flow.launchIn
|
||||
import eu.kanade.tachiyomi.data.preference.PreferenceKeys as Keys
|
||||
@ -76,7 +77,11 @@ class SettingsReaderController : SettingsController() {
|
||||
allSelectionRes = R.string.display_options
|
||||
allIsAlwaysSelected = true
|
||||
showAllLast = true
|
||||
defaultValue = ReaderActivity.BUTTONS_DEFAULTS
|
||||
val defaults = ReaderActivity.BUTTONS_DEFAULTS.toMutableList()
|
||||
if (context.isTablet()) {
|
||||
defaults.add(ReaderActivity.BottomButton.ShiftDoublePage.value)
|
||||
}
|
||||
defaultValue = defaults
|
||||
}
|
||||
infoPreference(R.string.certain_buttons_can_be_found)
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ class MultiListMatPreference @JvmOverloads constructor(
|
||||
|
||||
override fun onSetInitialValue(defaultValue: Any?) {
|
||||
super.onSetInitialValue(defaultValue)
|
||||
defValue = (defaultValue as? Set<*>).orEmpty().mapNotNull { it as? String }.toSet()
|
||||
defValue = (defaultValue as? Collection<*>).orEmpty().mapNotNull { it as? String }.toSet()
|
||||
}
|
||||
|
||||
override var customSummaryProvider: SummaryProvider<MatPreference>? = SummaryProvider<MatPreference> {
|
||||
|
Loading…
Reference in New Issue
Block a user