1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-01-19 13:48:58 +00:00

Fixed import cast error

This commit is contained in:
M66B 2023-10-03 22:07:31 +02:00
parent d6f142be77
commit 8ce3b7c7ce

View file

@ -1202,6 +1202,8 @@ public class FragmentOptionsBackup extends FragmentBase implements SharedPrefere
case "float":
if (value instanceof Double)
editor.putFloat(key, ((Double) value).floatValue());
else if (value instanceof Integer)
editor.putFloat(key, ((Integer) value).floatValue());
else
editor.putFloat(key, (Float) value);
break;
@ -1220,7 +1222,9 @@ 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)
else if (value instanceof Double)
editor.putFloat(key, ((Double) value).floatValue());
else if (value instanceof Float)
editor.putFloat(key, (Float) value);
else if (value instanceof String)
editor.putString(key, (String) value);