mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-10-12 03:07:46 +00:00
android: Prevent setup fragment crash in background
Sometimes during onSaveInstanceState, the SetupFragment would crash the app in the background if we tried to store the state of a view.
This commit is contained in:
parent
8d16a74198
commit
95c131060b
1 changed files with 4 additions and 2 deletions
|
@ -295,8 +295,10 @@ class SetupFragment : Fragment() {
|
||||||
|
|
||||||
override fun onSaveInstanceState(outState: Bundle) {
|
override fun onSaveInstanceState(outState: Bundle) {
|
||||||
super.onSaveInstanceState(outState)
|
super.onSaveInstanceState(outState)
|
||||||
outState.putBoolean(KEY_NEXT_VISIBILITY, binding.buttonNext.isVisible)
|
if (_binding != null) {
|
||||||
outState.putBoolean(KEY_BACK_VISIBILITY, binding.buttonBack.isVisible)
|
outState.putBoolean(KEY_NEXT_VISIBILITY, binding.buttonNext.isVisible)
|
||||||
|
outState.putBoolean(KEY_BACK_VISIBILITY, binding.buttonBack.isVisible)
|
||||||
|
}
|
||||||
outState.putBooleanArray(KEY_HAS_BEEN_WARNED, hasBeenWarned)
|
outState.putBooleanArray(KEY_HAS_BEEN_WARNED, hasBeenWarned)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue