Prevent crash

This commit is contained in:
M66B
2022-06-13 13:28:29 +02:00
parent 6844d50306
commit 16a494120a
9 changed files with 42 additions and 21 deletions

View File

@@ -1289,8 +1289,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
if ("message_zoom".equals(key))
return;
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED))
setOptions();
setOptions();
}
@Override
@@ -1314,6 +1313,9 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
}
private void setOptions() {
if (!getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED))
return;
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
String startup = prefs.getString("startup", "unified");