From c47c8411f240104af2a1c423c6e14298e02b2244 Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 3 Jan 2021 12:00:31 +0100 Subject: [PATCH] Made classification an experimental feature --- FAQ.md | 24 ++++++++++++++++++- .../java/eu/faircode/email/ApplicationEx.java | 4 ++++ .../eu/faircode/email/MessageClassifier.java | 2 +- 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/FAQ.md b/FAQ.md index 174bd1c87d..deceea359d 100644 --- a/FAQ.md +++ b/FAQ.md @@ -2834,7 +2834,7 @@ 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 +*[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. @@ -2844,6 +2844,28 @@ Synchronization for subscribed folders can therefore be disable, saving folder c **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, +using [Bayesian statistics](https://en.wikipedia.org/wiki/Bayesian_statistics). + +In the context of FairEmail a folder is a class. +There is a folder option to enable auto classification, +which will result in new messages in other folders being classified for the folder to be automatically moved to the folder. + +Moving a message on the device will declassify a message for the source folder. +Moving a message from another email client will not result in declassification because IMAP does not support MOVED notifications. + +Classification should be considered as a best guess, which could be no or a wrong guess too. + +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.
diff --git a/app/src/main/java/eu/faircode/email/ApplicationEx.java b/app/src/main/java/eu/faircode/email/ApplicationEx.java index d6de446813..2d23667032 100644 --- a/app/src/main/java/eu/faircode/email/ApplicationEx.java +++ b/app/src/main/java/eu/faircode/email/ApplicationEx.java @@ -391,6 +391,10 @@ public class ApplicationEx extends Application implements SharedPreferences.OnSh editor.remove("print_html_confirmed"); else if (version < 1413) editor.remove("experiments"); + else if (version < 1439) { + if (BuildConfig.PLAY_STORE_RELEASE) + editor.remove("experiments"); + } if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && !BuildConfig.DEBUG) editor.remove("background_service"); diff --git a/app/src/main/java/eu/faircode/email/MessageClassifier.java b/app/src/main/java/eu/faircode/email/MessageClassifier.java index c6ac5ef93b..2fb6bb56ce 100644 --- a/app/src/main/java/eu/faircode/email/MessageClassifier.java +++ b/app/src/main/java/eu/faircode/email/MessageClassifier.java @@ -319,7 +319,7 @@ public class MessageClassifier { static boolean isEnabled(Context context) { SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); - return prefs.getBoolean("classify", BuildConfig.DEBUG); + return prefs.getBoolean("experiments", false); } static boolean canClassify(String folderType) {