forked from upstream-mirrors/quik
@@ -161,6 +161,9 @@ class SettingsController : QkController<SettingsView, SettingsState, SettingsPre
|
||||
|
||||
textSize.summary = state.textSizeSummary
|
||||
textSizeDialog.adapter.selectedItem = state.textSizeId
|
||||
|
||||
autoColor.checkbox.isChecked = state.autoColor
|
||||
|
||||
systemFont.checkbox.isChecked = state.systemFontEnabled
|
||||
|
||||
unicode.checkbox.isChecked = state.stripUnicodeEnabled
|
||||
|
||||
@@ -100,6 +100,9 @@ class SettingsPresenter @Inject constructor(
|
||||
newState { copy(textSizeSummary = textSizeLabels[textSize], textSizeId = textSize) }
|
||||
}
|
||||
|
||||
disposables += prefs.autoColor.asObservable()
|
||||
.subscribe { autoColor -> newState { copy(autoColor = autoColor) } }
|
||||
|
||||
disposables += prefs.systemFont.asObservable()
|
||||
.subscribe { enabled -> newState { copy(systemFontEnabled = enabled) } }
|
||||
|
||||
@@ -164,6 +167,8 @@ class SettingsPresenter @Inject constructor(
|
||||
|
||||
R.id.textSize -> view.showTextSizePicker()
|
||||
|
||||
R.id.autoColor -> prefs.autoColor.set(!prefs.autoColor.get())
|
||||
|
||||
R.id.systemFont -> prefs.systemFont.set(!prefs.systemFont.get())
|
||||
|
||||
R.id.unicode -> prefs.unicode.set(!prefs.unicode.get())
|
||||
|
||||
@@ -28,6 +28,7 @@ data class SettingsState(
|
||||
val nightStart: String = "",
|
||||
val nightEnd: String = "",
|
||||
val black: Boolean = false,
|
||||
val autoColor: Boolean = true,
|
||||
val autoEmojiEnabled: Boolean = true,
|
||||
val notificationsEnabled: Boolean = true,
|
||||
val sendDelaySummary: String = "",
|
||||
|
||||
Reference in New Issue
Block a user