mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-01 06:38:29 +02:00
Seperate notification channel for separate accounts
This commit is contained in:
@@ -676,7 +676,7 @@ public class FragmentAccount extends FragmentEx {
|
||||
!user.equals(account.user) || !password.equals(account.password)));
|
||||
boolean reload = (check || account == null ||
|
||||
account.synchronize != synchronize ||
|
||||
account.poll_interval.equals(Integer.parseInt(interval)));
|
||||
!account.poll_interval.equals(Integer.parseInt(interval)));
|
||||
|
||||
// Check IMAP server
|
||||
if (check) {
|
||||
@@ -750,6 +750,15 @@ public class FragmentAccount extends FragmentEx {
|
||||
else
|
||||
account.id = db.account().insertAccount(account);
|
||||
|
||||
// Make sure the channel exists on commit
|
||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O)
|
||||
if (account.notify) {
|
||||
// Add or update notification channel
|
||||
account.deleteNotificationChannel(context);
|
||||
account.createNotificationChannel(context);
|
||||
} else if (!account.synchronize)
|
||||
account.deleteNotificationChannel(context);
|
||||
|
||||
List<EntityFolder> folders = new ArrayList<>();
|
||||
|
||||
EntityFolder inbox = new EntityFolder();
|
||||
|
||||
Reference in New Issue
Block a user