mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
rename permanent channel id, delete old/deprecated one
This commit is contained in:
@@ -12,6 +12,7 @@ import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.AppCompatDelegate;
|
||||
import androidx.core.app.NotificationManagerCompat;
|
||||
import androidx.multidex.MultiDexApplication;
|
||||
import androidx.work.Constraints;
|
||||
import androidx.work.ExistingPeriodicWorkPolicy;
|
||||
@@ -89,6 +90,12 @@ public class ApplicationContext extends MultiDexApplication {
|
||||
dcAccounts = new DcAccounts(new File(getFilesDir(), "accounts").getAbsolutePath());
|
||||
rpc = new Rpc(new FFITransport(dcAccounts.getJsonrpcInstance()));
|
||||
AccountManager.getInstance().migrateToDcAccounts(this);
|
||||
|
||||
// October-2025 migration: delete deprecated "permanent channel" id
|
||||
NotificationManagerCompat notificationManager = NotificationManagerCompat.from(this);
|
||||
notificationManager.deleteNotificationChannel("dc_foreground_notification_ch");
|
||||
// end October-2025 migration
|
||||
|
||||
int[] allAccounts = dcAccounts.getAll();
|
||||
for (int accountId : allAccounts) {
|
||||
DcContext ac = dcAccounts.getAccount(accountId);
|
||||
|
||||
@@ -241,7 +241,7 @@ public class NotificationCenter {
|
||||
// channelIds: CH_MSG_* are used here, the other ones from outside (defined here to have some overview)
|
||||
public static final String CH_MSG_PREFIX = "ch_msg";
|
||||
public static final String CH_MSG_VERSION = "5";
|
||||
public static final String CH_PERMANENT = "dc_foreground_notification_ch";
|
||||
public static final String CH_PERMANENT = "dc_fg_notification_ch";
|
||||
public static final String CH_GENERIC = "ch_generic";
|
||||
public static final String CH_CALLS_PREFIX = "call_chan";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user