Let users invert dual page split (#4470)

* Let users invert dual page split

* Use Activity lifecycleScope and cleanup invert logic
This commit is contained in:
Andreas
2021-02-20 15:26:57 +01:00
committed by GitHub
parent 3a790f3d66
commit 776610d0e6
10 changed files with 68 additions and 20 deletions
@@ -55,6 +55,13 @@ class SettingsReaderController : SettingsController() {
titleRes = R.string.pref_dual_page_split
defaultValue = false
}
switchPreference {
key = Keys.dualPageInvert
titleRes = R.string.pref_dual_page_invert
summaryRes = R.string.pref_dual_page_invert_summary
defaultValue = false
preferences.dualPageSplit().asImmediateFlow { isVisible = it }.launchIn(viewScope)
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
switchPreference {
key = Keys.trueColor