Loading presentation/src/main/java/com/moez/QKSMS/feature/settings/SettingsController.kt +1 −4 Original line number Diff line number Diff line Loading @@ -151,7 +151,7 @@ class SettingsController : QkController<SettingsView, SettingsState, SettingsPre override fun mmsSizeSelected(): Observable<Int> = mmsSizeDialog.adapter.menuItemClicks override fun render(state: SettingsState) { themePreview.setBackgroundTint(state.theme) // themePreview.setBackgroundTint(state.theme) night.summary = state.nightModeSummary nightModeDialog.adapter.selectedItem = state.nightModeId nightStart.setVisible(state.nightModeId == Preferences.NIGHT_MODE_AUTO) Loading @@ -159,9 +159,6 @@ class SettingsController : QkController<SettingsView, SettingsState, SettingsPre nightEnd.setVisible(state.nightModeId == Preferences.NIGHT_MODE_AUTO) nightEnd.summary = state.nightEnd black.setVisible(state.nightModeId != Preferences.NIGHT_MODE_OFF) black.checkbox.isChecked = state.black autoEmoji.checkbox.isChecked = state.autoEmojiEnabled delayed.summary = state.sendDelaySummary Loading presentation/src/main/java/com/moez/QKSMS/feature/settings/SettingsPresenter.kt +0 −4 Original line number Diff line number Diff line Loading @@ -152,8 +152,6 @@ class SettingsPresenter @Inject constructor( Timber.v("Preference click: ${context.resources.getResourceName(it.id)}") when (it.id) { R.id.theme -> view.showThemePicker() R.id.night -> view.showNightModeDialog() R.id.nightStart -> { Loading @@ -166,8 +164,6 @@ class SettingsPresenter @Inject constructor( view.showEndTimePicker(date.get(Calendar.HOUR_OF_DAY), date.get(Calendar.MINUTE)) } R.id.black -> prefs.black.set(!prefs.black.get()) R.id.autoEmoji -> prefs.autoEmoji.set(!prefs.autoEmoji.get()) R.id.notifications -> navigator.showNotificationSettings() Loading presentation/src/main/res/layout/settings_controller.xml +7 −15 Original line number Diff line number Diff line Loading @@ -36,13 +36,13 @@ <com.moez.QKSMS.common.widget.QkTextView style="@style/PreferenceCategory" android:text="@string/settings_category_appearance" /> <com.moez.QKSMS.common.widget.PreferenceView android:id="@+id/theme" android:layout_width="match_parent" android:layout_height="wrap_content" app:icon="@drawable/ic_color_lens_black_24dp" app:title="@string/settings_theme_title" app:widget="@layout/settings_theme_widget" /> <!-- <com.moez.QKSMS.common.widget.PreferenceView--> <!-- android:id="@+id/theme"--> <!-- android:layout_width="match_parent"--> <!-- android:layout_height="wrap_content"--> <!-- app:icon="@drawable/ic_color_lens_black_24dp"--> <!-- app:title="@string/settings_theme_title"--> <!-- app:widget="@layout/settings_theme_widget" />--> <com.moez.QKSMS.common.widget.PreferenceView android:id="@+id/night" Loading @@ -53,14 +53,6 @@ app:title="@string/settings_night_title" tools:summary="Automatic" /> <com.moez.QKSMS.common.widget.PreferenceView android:id="@+id/black" android:layout_width="match_parent" android:layout_height="wrap_content" android:visibility="gone" app:title="@string/settings_black_title" app:widget="@layout/settings_switch_widget" /> <com.moez.QKSMS.common.widget.PreferenceView android:id="@+id/nightStart" android:layout_width="match_parent" Loading Loading
presentation/src/main/java/com/moez/QKSMS/feature/settings/SettingsController.kt +1 −4 Original line number Diff line number Diff line Loading @@ -151,7 +151,7 @@ class SettingsController : QkController<SettingsView, SettingsState, SettingsPre override fun mmsSizeSelected(): Observable<Int> = mmsSizeDialog.adapter.menuItemClicks override fun render(state: SettingsState) { themePreview.setBackgroundTint(state.theme) // themePreview.setBackgroundTint(state.theme) night.summary = state.nightModeSummary nightModeDialog.adapter.selectedItem = state.nightModeId nightStart.setVisible(state.nightModeId == Preferences.NIGHT_MODE_AUTO) Loading @@ -159,9 +159,6 @@ class SettingsController : QkController<SettingsView, SettingsState, SettingsPre nightEnd.setVisible(state.nightModeId == Preferences.NIGHT_MODE_AUTO) nightEnd.summary = state.nightEnd black.setVisible(state.nightModeId != Preferences.NIGHT_MODE_OFF) black.checkbox.isChecked = state.black autoEmoji.checkbox.isChecked = state.autoEmojiEnabled delayed.summary = state.sendDelaySummary Loading
presentation/src/main/java/com/moez/QKSMS/feature/settings/SettingsPresenter.kt +0 −4 Original line number Diff line number Diff line Loading @@ -152,8 +152,6 @@ class SettingsPresenter @Inject constructor( Timber.v("Preference click: ${context.resources.getResourceName(it.id)}") when (it.id) { R.id.theme -> view.showThemePicker() R.id.night -> view.showNightModeDialog() R.id.nightStart -> { Loading @@ -166,8 +164,6 @@ class SettingsPresenter @Inject constructor( view.showEndTimePicker(date.get(Calendar.HOUR_OF_DAY), date.get(Calendar.MINUTE)) } R.id.black -> prefs.black.set(!prefs.black.get()) R.id.autoEmoji -> prefs.autoEmoji.set(!prefs.autoEmoji.get()) R.id.notifications -> navigator.showNotificationSettings() Loading
presentation/src/main/res/layout/settings_controller.xml +7 −15 Original line number Diff line number Diff line Loading @@ -36,13 +36,13 @@ <com.moez.QKSMS.common.widget.QkTextView style="@style/PreferenceCategory" android:text="@string/settings_category_appearance" /> <com.moez.QKSMS.common.widget.PreferenceView android:id="@+id/theme" android:layout_width="match_parent" android:layout_height="wrap_content" app:icon="@drawable/ic_color_lens_black_24dp" app:title="@string/settings_theme_title" app:widget="@layout/settings_theme_widget" /> <!-- <com.moez.QKSMS.common.widget.PreferenceView--> <!-- android:id="@+id/theme"--> <!-- android:layout_width="match_parent"--> <!-- android:layout_height="wrap_content"--> <!-- app:icon="@drawable/ic_color_lens_black_24dp"--> <!-- app:title="@string/settings_theme_title"--> <!-- app:widget="@layout/settings_theme_widget" />--> <com.moez.QKSMS.common.widget.PreferenceView android:id="@+id/night" Loading @@ -53,14 +53,6 @@ app:title="@string/settings_night_title" tools:summary="Automatic" /> <com.moez.QKSMS.common.widget.PreferenceView android:id="@+id/black" android:layout_width="match_parent" android:layout_height="wrap_content" android:visibility="gone" app:title="@string/settings_black_title" app:widget="@layout/settings_switch_widget" /> <com.moez.QKSMS.common.widget.PreferenceView android:id="@+id/nightStart" android:layout_width="match_parent" Loading