Added missing setting type

This commit is contained in:
M66B
2023-04-26 19:57:47 +02:00
parent 0f2f4b3b11
commit 1d3abc8b2b
2 changed files with 7 additions and 2 deletions

View File

@@ -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 {