Automatic classification is a pro feature

pull/190/head
M66B 4 years ago
parent 42598dd43e
commit d83a4d7d7c

@ -3415,22 +3415,25 @@ Message classification will attempt to automatically group emails into classes,
using [Bayesian statistics](https://en.wikipedia.org/wiki/Bayesian_statistics).
In the context of FairEmail, a folder is a class.
You can enable 'learning' mode in the miscellaneous settings.
You can enable message classification in the miscellaneous settings.
This will enable learning mode only.
Each folder has an option to enable auto classification.
Each folder has an option to enable automatic message classification.
When this is turned on, new messages in other folders which the classifier thinks belong to that folder will be automatically moved.
Classification should be considered as a best guess - it might be a wrong guess, or the classifier might not be confident enough to make any guess.
If the classifier is unsure, it will simply leave an email where it is.
Classification will be done for new messages in the inbox, spam folder and user folders only.
You can clear local messages (long press a folder in the folder list) and synchronize the messages again to classify existing messages.
You can clear local messages (long press a folder in the folder list of an account) and synchronize the messages again to classify existing messages.
Moving a message on the device will reclassify the message.
Moving a message from another email client will not result in reclassification because IMAP does not support MOVED notifications.
Moving a message from another email client will not result in reclassification because IMAP does not support 'moved' notifications.
Classification is optimized to use as little resources as possible, but will inevitably use some extra battery power.
Automatic message classification is a pro feature, except for the spam folder.
<br />
## Get support

@ -79,6 +79,7 @@ All pro features are convenience or advanced features.
* Accept/decline calendar invitations
* Add message to calendar
* Filter rules
* Automatic message classification
* Search indexing, search on server
* Keyword management
* S/MIME sign/encrypt

@ -96,6 +96,7 @@ All pro features are convenience or advanced features.
* Accept/decline calendar invitations
* Add message to calendar
* Filter rules ([instructions](https://github.com/M66B/FairEmail/blob/master/FAQ.md#user-content-faq71))
* Automatic message classification ([instructions](https://github.com/M66B/FairEmail/blob/master/FAQ.md#user-content-faq163))
* Search indexing, search on server ([instructions](https://github.com/M66B/FairEmail/blob/master/FAQ.md#user-content-faq13))
* Keyword management
* S/MIME sign/encrypt ([instructions](https://github.com/M66B/FairEmail/blob/master/FAQ.md#user-content-faq12))

@ -70,6 +70,7 @@ public class FragmentFolder extends FragmentBase {
private TextView tvPoll;
private CheckBox cbDownload;
private CheckBox cbAutoClassify;
private TextView tvAutoClassifyPro;
private Button btnInfo;
private EditText etSyncDays;
private EditText etKeepDays;
@ -131,6 +132,7 @@ public class FragmentFolder extends FragmentBase {
tvPoll = view.findViewById(R.id.tvPoll);
cbDownload = view.findViewById(R.id.cbDownload);
cbAutoClassify = view.findViewById(R.id.cbAutoClassify);
tvAutoClassifyPro = view.findViewById(R.id.tvAutoClassifyPro);
btnInfo = view.findViewById(R.id.btnInfo);
etSyncDays = view.findViewById(R.id.etSyncDays);
etKeepDays = view.findViewById(R.id.etKeepDays);
@ -177,6 +179,8 @@ public class FragmentFolder extends FragmentBase {
}
});
Helper.linkPro(tvAutoClassifyPro);
btnInfo.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
@ -218,6 +222,7 @@ public class FragmentFolder extends FragmentBase {
tvParent.setText(parent);
grpParent.setVisibility(parent == null ? View.GONE : View.VISIBLE);
cbAutoClassify.setVisibility(View.GONE);
tvAutoClassifyPro.setVisibility(View.GONE);
grpAutoDelete.setVisibility(View.GONE);
btnSave.setEnabled(false);
pbSave.setVisibility(View.GONE);
@ -300,15 +305,19 @@ public class FragmentFolder extends FragmentBase {
Helper.setViewsEnabled(view, true);
boolean always = (!ondemand && (pollInterval == 0 || exempted));
boolean canAutoClassify = (imap &&
MessageClassifier.isEnabled(getContext()) &&
(folder == null || MessageClassifier.canClassify(folder.type)));
boolean isJunk = (folder != null && EntityFolder.JUNK.equals(folder.type));
etName.setEnabled(folder == null || EntityFolder.USER.equals(folder.type));
cbPoll.setEnabled(cbSynchronize.isChecked() && always);
etPoll.setEnabled(cbSynchronize.isChecked() && always);
tvPoll.setEnabled(cbSynchronize.isChecked() && always);
grpPoll.setVisibility(imap && cbPoll.isEnabled() && cbPoll.isChecked() ? View.VISIBLE : View.GONE);
cbAutoClassify.setVisibility(MessageClassifier.isEnabled(getContext()) &&
(folder == null || MessageClassifier.canClassify(folder.type))
? View.VISIBLE : View.GONE);
cbAutoClassify.setEnabled(canAutoClassify && (isJunk || ActivityBilling.isPro(getContext())));
cbAutoClassify.setVisibility(canAutoClassify ? View.VISIBLE : View.GONE);
tvAutoClassifyPro.setVisibility(canAutoClassify && !cbAutoClassify.isEnabled() ? View.VISIBLE : View.GONE);
etKeepDays.setEnabled(!cbKeepAll.isChecked());
cbAutoDelete.setEnabled(!cbKeepAll.isChecked());
cbAutoDelete.setText(folder != null && EntityFolder.TRASH.equals(folder.type)

@ -110,7 +110,8 @@ public class MessageClassifier {
if (classified != null) {
EntityFolder f = db.folder().getFolderByName(account.id, classified);
if (f != null && !f.id.equals(folder.id) && f.auto_classify)
if (f != null && !f.id.equals(folder.id) && f.auto_classify &&
(EntityFolder.JUNK.equals(f.type) || ActivityBilling.isPro(context)))
try {
db.beginTransaction();

@ -206,6 +206,16 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbDownload" />
<eu.faircode.email.FixedTextView
android:id="@+id/tvAutoClassifyPro"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/title_pro_feature"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textColor="?android:attr/textColorLink"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbAutoClassify" />
<!-- after -->
<eu.faircode.email.FixedTextView
@ -216,7 +226,7 @@
android:text="@string/title_sync_days"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cbAutoClassify" />
app:layout_constraintTop_toBottomOf="@id/tvAutoClassifyPro" />
<eu.faircode.email.FixedTextView
android:id="@+id/tvSyncDaysRemark"
@ -364,7 +374,7 @@
android:layout_width="0dp"
android:layout_height="0dp"
app:constraint_referenced_ids="
cbSynchronize,cbPoll,cbDownload,cbAutoClassify,
cbSynchronize,cbPoll,cbDownload,
tvSyncDays,tvSyncDaysRemark,btnInfo,etSyncDays,
tvKeepDays,tvKeepDaysRemark,etKeepDays,cbKeepAll" />

@ -79,6 +79,7 @@ All pro features are convenience or advanced features.
* Accept/decline calendar invitations
* Add message to calendar
* Filter rules
* Automatic message classification
* Search indexing, search on server
* Keyword management
* S/MIME sign/encrypt

Loading…
Cancel
Save