fix(ui): hacky fix for updating colors on show question marks setting change

This only applies if the grey completed setting is enabled.
This is to avoid restarting the app to see the resulting color change,
when changing the show question marks setting.

It'll be good to call `finish()` on the settings activity,
to avoid stacking activities every time the setting is changed.
pull/2138/head
powerjungle 6 months ago
parent 97a1a58a39
commit d43fd52553
No known key found for this signature in database
GPG Key ID: 5392BD8A57239AD8

@ -75,8 +75,12 @@ class ListHabitsActivity : AppCompatActivity(), Preferences.Listener {
private lateinit var menu: ListHabitsMenu private lateinit var menu: ListHabitsMenu
override fun onQuestionMarksChanged() { override fun onQuestionMarksChanged() {
invalidateOptionsMenu() if (prefs.greyCompleted) {
menu.behavior.onPreferencesChanged() restartWithFade(this::class.java)
} else {
invalidateOptionsMenu()
menu.behavior.onPreferencesChanged()
}
} }
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {

Loading…
Cancel
Save