From 01ed43686cb899e1f621164d7ed8701443c72bd9 Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 3 Jan 2021 12:41:16 +0100 Subject: [PATCH] IMAP notify support --- FAQ.md | 29 ++++++++++--------- .../java/eu/faircode/email/ApplicationEx.java | 2 +- .../eu/faircode/email/ServiceSynchronize.java | 3 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/FAQ.md b/FAQ.md index deceea359d..9f087015a0 100644 --- a/FAQ.md +++ b/FAQ.md @@ -287,6 +287,7 @@ Fonts, sizes, colors, etc should be material design whenever possible. * [(159) What are Disconnect's tracker protection lists?](#user-content-faq159) * [(160) Can you add permanent deletion of messages without confirmation?](#user-content-faq160) * [(161) Can you add a setting to change the primary and accent color?](#user-content-faq161) +* [(162) Is IMAP NOTIFY supported?](#user-content-faq162) [I have another question.](#user-content-support) @@ -2834,18 +2835,6 @@ Reformatting and displaying such messages will take too long. You can try to use **(125) What are the current experimental features?** -*[IMAP NOTIFY](https://tools.ietf.org/html/rfc5465) support (version 1.1413+)* - -IMAP NOTIFY support means that notifications for added, changed or deleted messages of all *subscribed* folders will be requested -and if a notification is received for a subscribed folder, that the folder will be synchronized. -Synchronization for subscribed folders can therefore be disable, saving folder connections to the email server. - -**Important**: push messages (=always sync) for the inbox needs to be enabled. - -**Important**: most email server do not support this! You can check the log via the navigation menu if an email server supports the NOTIFY capability. - -
- *Message classification (version 1.1438+)* Messages will be classified based on the message text, @@ -2864,8 +2853,6 @@ Classification will be done for the inbox, spam folder and user folders only. Classification is optimized to use as little resources as possible, but will inevitably use some extra battery power. -
- You can enable experimental features in the miscellaneous settings.
@@ -3419,6 +3406,20 @@ but unfortunately Android themes are fixed, see for example [here](https://stack
+ +**(162) Is IMAP NOTIFY supported?*** + +Yes, [IMAP NOTIFY](https://tools.ietf.org/html/rfc5465) has been supported since version 1.1413. + +IMAP NOTIFY support means that notifications for added, changed or deleted messages of all *subscribed* folders will be requested +and if a notification is received for a subscribed folder, that the folder will be synchronized. +Synchronization for subscribed folders can therefore be disable, saving folder connections to the email server. + +**Important**: push messages (=always sync) for the inbox and subscription management (receive settings) need to be enabled. + +**Important**: most email servers do not support this! You can check the log via the navigation menu if an email server supports the NOTIFY capability. + +
## Get support diff --git a/app/src/main/java/eu/faircode/email/ApplicationEx.java b/app/src/main/java/eu/faircode/email/ApplicationEx.java index 2d23667032..d5e22aa543 100644 --- a/app/src/main/java/eu/faircode/email/ApplicationEx.java +++ b/app/src/main/java/eu/faircode/email/ApplicationEx.java @@ -392,7 +392,7 @@ public class ApplicationEx extends Application implements SharedPreferences.OnSh else if (version < 1413) editor.remove("experiments"); else if (version < 1439) { - if (BuildConfig.PLAY_STORE_RELEASE) + if (!BuildConfig.DEBUG) editor.remove("experiments"); } diff --git a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java index 129fc1d229..fce966e7d9 100644 --- a/app/src/main/java/eu/faircode/email/ServiceSynchronize.java +++ b/app/src/main/java/eu/faircode/email/ServiceSynchronize.java @@ -1013,7 +1013,6 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences // Debug SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); boolean subscriptions = prefs.getBoolean("subscriptions", false); - boolean experiments = prefs.getBoolean("experiments", false); boolean debug = (prefs.getBoolean("debug", false) || BuildConfig.DEBUG); final EmailService iservice = new EmailService( @@ -1099,7 +1098,7 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences if (!capIdle || account.poll_interval < OPTIMIZE_KEEP_ALIVE_INTERVAL) optimizeAccount(account, "IDLE"); - final boolean capNotify = (experiments && iservice.hasCapability("NOTIFY")); + final boolean capNotify = iservice.hasCapability("NOTIFY"); db.account().setAccountState(account.id, "connected"); db.account().setAccountError(account.id, null);