Bind the margin ratio as a float preference and rename variables
- Fixed the floatListPreference that was used in the SettingsReaderController - Created new extension for binding float preferences in the ReaderSettingsSheet - Renamed the ratio variables to include the `webtoon` naming
This commit is contained in:
@@ -51,7 +51,7 @@ object PreferenceKeys {
|
||||
|
||||
const val readWithVolumeKeysInverted = "reader_volume_keys_inverted"
|
||||
|
||||
const val webtoonMarginRatio = "margin_ratio"
|
||||
const val marginRatioWebtoon = "margin_ratio_webtoon"
|
||||
|
||||
const val portraitColumns = "pref_library_columns_portrait_key"
|
||||
|
||||
|
||||
@@ -71,6 +71,8 @@ class PreferencesHelper(val context: Context) {
|
||||
|
||||
fun cropBordersWebtoon() = rxPrefs.getBoolean(Keys.cropBordersWebtoon, false)
|
||||
|
||||
fun marginRatioWebtoon() = rxPrefs.getFloat(Keys.marginRatioWebtoon, 0f)
|
||||
|
||||
fun readWithTapping() = rxPrefs.getBoolean(Keys.readWithTapping, true)
|
||||
|
||||
fun readWithLongTap() = rxPrefs.getBoolean(Keys.readWithLongTap, true)
|
||||
@@ -79,8 +81,6 @@ class PreferencesHelper(val context: Context) {
|
||||
|
||||
fun readWithVolumeKeysInverted() = rxPrefs.getBoolean(Keys.readWithVolumeKeysInverted, false)
|
||||
|
||||
fun marginRatio() = rxPrefs.getInteger(Keys.webtoonMarginRatio, 0)
|
||||
|
||||
fun portraitColumns() = rxPrefs.getInteger(Keys.portraitColumns, 0)
|
||||
|
||||
fun landscapeColumns() = rxPrefs.getInteger(Keys.landscapeColumns, 0)
|
||||
|
||||
Reference in New Issue
Block a user