Disable folder notify setting on Android 7 Nougat and before

Notification grouping is available on Android 7 Nougat and later only
Showing a notification per message is not a good idea
The summary notification is used to navigate to the unified inbox
This commit is contained in:
M66B 2018-12-10 09:38:56 +01:00
parent 0267e7ad39
commit 1f54eed6a8
3 changed files with 12 additions and 3 deletions

5
FAQ.md
View File

@ -407,7 +407,10 @@ See [this FAQ](#user-content-faq21) if your device has a notification light.
<a name="faq29"></a>
**(29) How can I get new message notifications for other folders?**
Just long press the folder, select *Edit properties*, enable *Notify new messages* and tap *Save*.
Just long press a folder, select *Edit properties*,
and enable either *Show in unified inbox*
or *Notify new messages* (available on Android 7 Nougat and later only)
and tap *Save*.
<a name="faq30"></a>
**(30) How can I use the provided quick settings?**

View File

@ -37,7 +37,7 @@ See also [this FAQ](https://github.com/M66B/open-source-email/blob/master/FAQ.md
* Dark/black theme
* Account/identity colors
* Notifications per account
* Notifications with message preview
* Notifications with message preview (requires Android 7 Nougat or later)
* Reply templates
* Search on server
* Keyword management
@ -85,6 +85,8 @@ Certificate fingerprints:
## Compatibility
FairEmail requires at least Android 5 Lollipop.
Individual message notifications are available on Android 7 Nougat and later only
because earlier Android versions do not support notification grouping.
FairEmail will work properly on devices without any Google service installed.

View File

@ -21,6 +21,7 @@ package eu.faircode.email;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Build;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Log;
@ -109,6 +110,9 @@ public class FragmentFolder extends FragmentEx {
}
});
// Navigating to individual messages requires notification grouping
cbNotify.setVisibility(Build.VERSION.SDK_INT >= Build.VERSION_CODES.N ? View.VISIBLE : View.GONE);
btnSave.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
@ -125,7 +129,7 @@ public class FragmentFolder extends FragmentEx {
args.putBoolean("unified", cbUnified.isChecked());
args.putBoolean("synchronize", cbSynchronize.isChecked());
args.putBoolean("poll", cbPoll.isChecked());
args.putBoolean("notify", cbNotify.isChecked());
args.putBoolean("notify", cbNotify.getVisibility() == View.VISIBLE && cbNotify.isChecked());
args.putString("sync", etSyncDays.getText().toString());
args.putString("keep", etKeepDays.getText().toString());