From e696cadaf064c1e824d02b76e51ed391d376170e Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 25 Jun 2023 15:24:54 +0200 Subject: [PATCH] Bakcward compatibility --- .../main/java/eu/faircode/email/FragmentOptionsBackup.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentOptionsBackup.java b/app/src/main/java/eu/faircode/email/FragmentOptionsBackup.java index b952e4d3d2..f0be845a67 100644 --- a/app/src/main/java/eu/faircode/email/FragmentOptionsBackup.java +++ b/app/src/main/java/eu/faircode/email/FragmentOptionsBackup.java @@ -1173,7 +1173,10 @@ public class FragmentOptionsBackup extends FragmentBase implements SharedPrefere editor.putLong(key, (Long) value); break; case "float": - editor.putFloat(key, (Float) value); + if (value instanceof Double) + editor.putFloat(key, ((Double) value).floatValue()); + else + editor.putFloat(key, (Float) value); break; case "string": editor.putString(key, (String) value);