* This file is part of Privacy Cell <https://www.stoutner.com/privacy-cell>.
*
*
* This file is part of Privacy Cell <https://www.stoutner.com/privacy-cell>.
*
@@ -56,7+56,7 @@ class SettingsFragment : PreferenceFragmentCompat() {
private lateinit var bottomAppBarPreference: Preference
companion object {
private lateinit var bottomAppBarPreference: Preference
companion object {
- // Declare the private static class variables. Otherwise, onRestart will not pull the same values that are populated from the saved instance state.
+ // Declare the private static class variables. For some reason (I'm looking at you Android's Activity Lifecycle) this only works if these are static.
private var fragmentRestarted: Boolean = false
private var scrollY: Int = 0
}
private var fragmentRestarted: Boolean = false
private var scrollY: Int = 0
}
@@ -140,7+140,7 @@ class SettingsFragment : PreferenceFragmentCompat() {