1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-01-01 04:35:57 +00:00

Added init core

This commit is contained in:
M66B 2019-03-02 15:03:09 +00:00
parent eb3de5b7c5
commit a0edb817a7
2 changed files with 10 additions and 0 deletions

View file

@ -63,6 +63,7 @@ public class ApplicationEx extends Application {
createNotificationChannels();
MessageHelper.setSystemProperties();
Core.init(this);
}
private void createNotificationChannels() {

View file

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