Fix crash when settings is closed quickly

This commit is contained in:
Moez Bhatti
2018-09-05 00:37:16 -04:00
parent c42de6f827
commit e285892424
4 changed files with 5 additions and 5 deletions
@@ -72,7 +72,7 @@ class SettingsController : QkController<SettingsView, SettingsState, SettingsPre
}
override fun onViewCreated() {
preferences.postDelayed({ preferences.animateLayoutChanges = true }, 100)
preferences.postDelayed({ preferences?.animateLayoutChanges = true }, 100)
nightModeDialog.adapter.setData(R.array.night_modes)
textSizeDialog.adapter.setData(R.array.text_sizes)
@@ -62,8 +62,8 @@ class SwipeActionsController : QkController<SwipeActionsView, SwipeActionsState,
leftIcon.setTint(theme.textPrimary)
}
right.postDelayed({ right.animateLayoutChanges = true }, 100)
left.postDelayed({ left.animateLayoutChanges = true }, 100)
right.postDelayed({ right?.animateLayoutChanges = true }, 100)
left.postDelayed({ left?.animateLayoutChanges = true }, 100)
Observable.merge(
right.clicks().map { SwipeActionsView.Action.RIGHT },