diff --git a/app/src/main/java/eu/faircode/email/ApplicationEx.java b/app/src/main/java/eu/faircode/email/ApplicationEx.java index 7ea4b3013a..49dd2549ad 100644 --- a/app/src/main/java/eu/faircode/email/ApplicationEx.java +++ b/app/src/main/java/eu/faircode/email/ApplicationEx.java @@ -63,6 +63,7 @@ public class ApplicationEx extends Application { createNotificationChannels(); MessageHelper.setSystemProperties(); + Core.init(this); } private void createNotificationChannels() { diff --git a/app/src/main/java/eu/faircode/email/Core.java b/app/src/main/java/eu/faircode/email/Core.java index 4ee12321d5..3bb850abed 100644 --- a/app/src/main/java/eu/faircode/email/Core.java +++ b/app/src/main/java/eu/faircode/email/Core.java @@ -94,6 +94,15 @@ class Core { private static final int DOWNLOAD_BATCH_SIZE = 20; private static final long YIELD_DURATION = 200L; // milliseconds + static void init(Context context) { + SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); + SharedPreferences.Editor editor = prefs.edit(); + for (String key : prefs.getAll().keySet()) + if (key.startsWith("notifying:")) + editor.remove(key); + editor.apply(); + } + static void processOperations( Context context, EntityAccount account, EntityFolder folder,