mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-25 15:10:47 +01:00
Use account id as group id
This commit is contained in:
@@ -844,11 +844,12 @@ public class ActivitySetup extends ActivityBilling implements FragmentManager.On
|
||||
account.deleteNotificationChannel(context);
|
||||
if (account.notify)
|
||||
if (jaccount.has("channel")) {
|
||||
NotificationChannelGroup group = new NotificationChannelGroup(account.name, account.name);
|
||||
NotificationChannelGroup group = new NotificationChannelGroup("group." + account.id, account.name);
|
||||
nm.createNotificationChannelGroup(group);
|
||||
|
||||
JSONObject jchannel = (JSONObject) jaccount.get("channel");
|
||||
jchannel.put("id", EntityAccount.getNotificationChannelId(account.id));
|
||||
jchannel.put("group", group.getId());
|
||||
nm.createNotificationChannel(channelFromJSON(context, jchannel));
|
||||
|
||||
Log.i("Imported account channel=" + jchannel);
|
||||
@@ -892,11 +893,12 @@ public class ActivitySetup extends ActivityBilling implements FragmentManager.On
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
if (jfolder.has("channel")) {
|
||||
NotificationChannelGroup group = new NotificationChannelGroup(account.name, account.name);
|
||||
NotificationChannelGroup group = new NotificationChannelGroup("group." + account.id, account.name);
|
||||
nm.createNotificationChannelGroup(group);
|
||||
|
||||
JSONObject jchannel = (JSONObject) jfolder.get("channel");
|
||||
jchannel.put("id", EntityFolder.getNotificationChannelId(folder.id));
|
||||
jchannel.put("group", group.getId());
|
||||
nm.createNotificationChannel(channelFromJSON(context, jchannel));
|
||||
|
||||
Log.i("Imported folder channel=" + jchannel);
|
||||
|
||||
Reference in New Issue
Block a user