Fixed incorrect on close value

master
M66B 2 weeks ago
parent a9e17cb2cc
commit 5ed881b420

@ -1144,6 +1144,10 @@ public class ApplicationEx extends Application
editor.remove("setup_reminder");
editor.putInt("last_sdk", Build.VERSION.SDK_INT);
String onclose = prefs.getString("onclose", null);
if ("none".equals(onclose))
editor.remove("onclose");
editor.apply();
}

@ -480,7 +480,7 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
public void onItemSelected(AdapterView<?> adapterView, View view, int position, long id) {
String[] values = getResources().getStringArray(R.array.onCloseValues);
String value = values[position];
if (TextUtils.isEmpty(value))
if ("none".equals(value))
prefs.edit().remove("onclose").apply();
else
prefs.edit().putString("onclose", value).apply();

Loading…
Cancel
Save