forked from upstream-mirrors/quik
Fix crash when returning to theme selector
This commit is contained in:
@@ -67,12 +67,7 @@ class SettingsController : QkController<SettingsView, SettingsState, SettingsPre
|
||||
.subscribe { activity?.recreate() }
|
||||
}
|
||||
|
||||
override fun onAttach(view: View) {
|
||||
super.onAttach(view)
|
||||
presenter.bindIntents(this)
|
||||
setTitle(R.string.title_settings)
|
||||
showBackButton(true)
|
||||
|
||||
override fun onViewCreated() {
|
||||
preferences.postDelayed({ preferences.animateLayoutChanges = true }, 100)
|
||||
|
||||
nightModeDialog.adapter.setData(R.array.night_modes)
|
||||
@@ -83,6 +78,13 @@ class SettingsController : QkController<SettingsView, SettingsState, SettingsPre
|
||||
about.summary = context.getString(R.string.settings_version, BuildConfig.VERSION_NAME)
|
||||
}
|
||||
|
||||
override fun onAttach(view: View) {
|
||||
super.onAttach(view)
|
||||
presenter.bindIntents(this)
|
||||
setTitle(R.string.title_settings)
|
||||
showBackButton(true)
|
||||
}
|
||||
|
||||
override fun preferenceClicks(): Observable<PreferenceView> = (0 until preferences.childCount)
|
||||
.map { index -> preferences.getChildAt(index) }
|
||||
.mapNotNull { view -> view as? PreferenceView }
|
||||
|
||||
@@ -20,13 +20,15 @@ class AboutController : QkController<AboutView, Unit, AboutPresenter>(), AboutVi
|
||||
layoutRes = R.layout.about_controller
|
||||
}
|
||||
|
||||
override fun onViewCreated() {
|
||||
version.summary = BuildConfig.VERSION_NAME
|
||||
}
|
||||
|
||||
override fun onAttach(view: View) {
|
||||
super.onAttach(view)
|
||||
presenter.bindIntents(this)
|
||||
setTitle(R.string.about_title)
|
||||
showBackButton(true)
|
||||
|
||||
version.summary = BuildConfig.VERSION_NAME
|
||||
}
|
||||
|
||||
override fun preferenceClicks(): Observable<PreferenceView> = (0 until preferences.childCount)
|
||||
|
||||
+8
-6
@@ -54,12 +54,7 @@ class SwipeActionsController : QkController<SwipeActionsView, SwipeActionsState,
|
||||
actionsDialog.adapter.setData(R.array.settings_swipe_actions)
|
||||
}
|
||||
|
||||
override fun onAttach(view: View) {
|
||||
super.onAttach(view)
|
||||
presenter.bindIntents(this)
|
||||
setTitle(R.string.settings_swipe_actions)
|
||||
showBackButton(true)
|
||||
|
||||
override fun onViewCreated() {
|
||||
colors.theme().let { theme ->
|
||||
rightIcon.setBackgroundTint(theme.theme)
|
||||
rightIcon.setTint(theme.textPrimary)
|
||||
@@ -77,6 +72,13 @@ class SwipeActionsController : QkController<SwipeActionsView, SwipeActionsState,
|
||||
.subscribe(actionClicks)
|
||||
}
|
||||
|
||||
override fun onAttach(view: View) {
|
||||
super.onAttach(view)
|
||||
presenter.bindIntents(this)
|
||||
setTitle(R.string.settings_swipe_actions)
|
||||
showBackButton(true)
|
||||
}
|
||||
|
||||
override fun actionClicks(): Observable<SwipeActionsView.Action> = actionClicks
|
||||
|
||||
override fun actionSelected(): Observable<Int> = actionsDialog.adapter.menuItemClicks
|
||||
|
||||
Reference in New Issue
Block a user