Added missing setting type

pull/212/head
M66B 2 years ago
parent 0f2f4b3b11
commit 1d3abc8b2b

@ -700,8 +700,6 @@ public class ApplicationEx extends Application
editor.putBoolean("plain_only_reply", true);
} else if (version < 2046)
editor.remove("message_junk");
else if (version < 2068)
editor.remove("openai_temperature");
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && !BuildConfig.DEBUG)
editor.remove("background_service");

@ -510,6 +510,8 @@ public class FragmentOptionsBackup extends FragmentBase implements SharedPrefere
jsetting.put("type", "int");
else if (value instanceof Long)
jsetting.put("type", "long");
else if (value instanceof Float)
jsetting.put("type", "float");
else if (value instanceof String)
jsetting.put("type", "string");
else if (value != null) {
@ -1170,6 +1172,9 @@ public class FragmentOptionsBackup extends FragmentBase implements SharedPrefere
else
editor.putLong(key, (Long) value);
break;
case "float":
editor.putFloat(key, (Float) value);
break;
case "string":
editor.putString(key, (String) value);
break;
@ -1185,6 +1190,8 @@ public class FragmentOptionsBackup extends FragmentBase implements SharedPrefere
editor.putInt(key, i);
} else if (value instanceof Long)
editor.putLong(key, (Long) value);
else if (value instanceof Float || value instanceof Double)
editor.putFloat(key, (Float) value);
else if (value instanceof String)
editor.putString(key, (String) value);
else {

Loading…
Cancel
Save