Refactored export/import notification channels

This commit is contained in:
M66B
2019-06-08 09:34:29 +02:00
parent de37f8aabf
commit 183bb1b7a9
7 changed files with 196 additions and 152 deletions

View File

@@ -943,12 +943,14 @@ public class FragmentAccount extends FragmentBase {
EntityLog.log(context, (update ? "Updated" : "Added") + " account=" + account.name);
// Make sure the channel exists on commit
if (account.notify) {
// Add or update notification channel
account.deleteNotificationChannel(context);
account.createNotificationChannel(context);
} else if (!account.synchronize)
account.deleteNotificationChannel(context);
if (Build.VERSION.SDK_INT >= 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<>();