diff --git a/CHANGELOG.md b/CHANGELOG.md index 05b4ea5f5..be3083bf6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Delta Chat Android Changelog +## Unreleased + +* don't show badge counter in app icon for the permanent background notification + ## v2.22.0 2025-10 diff --git a/src/main/java/org/thoughtcrime/securesms/ApplicationContext.java b/src/main/java/org/thoughtcrime/securesms/ApplicationContext.java index dbe09ab9a..5a0bafd8f 100644 --- a/src/main/java/org/thoughtcrime/securesms/ApplicationContext.java +++ b/src/main/java/org/thoughtcrime/securesms/ApplicationContext.java @@ -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); diff --git a/src/main/java/org/thoughtcrime/securesms/connect/KeepAliveService.java b/src/main/java/org/thoughtcrime/securesms/connect/KeepAliveService.java index 4cae5cef9..c6929ce95 100644 --- a/src/main/java/org/thoughtcrime/securesms/connect/KeepAliveService.java +++ b/src/main/java/org/thoughtcrime/securesms/connect/KeepAliveService.java @@ -121,6 +121,7 @@ public class KeepAliveService extends Service { NotificationChannel channel = new NotificationChannel(NotificationCenter.CH_PERMANENT, "Receive messages in background.", NotificationManager.IMPORTANCE_MIN); // IMPORTANCE_DEFAULT will play a sound channel.setDescription("Ensure reliable message receiving."); + channel.setShowBadge(false); NotificationManager notificationManager = context.getSystemService(NotificationManager.class); notificationManager.createNotificationChannel(channel); } diff --git a/src/main/java/org/thoughtcrime/securesms/notifications/NotificationCenter.java b/src/main/java/org/thoughtcrime/securesms/notifications/NotificationCenter.java index 4c96c1c2b..11ef6a130 100644 --- a/src/main/java/org/thoughtcrime/securesms/notifications/NotificationCenter.java +++ b/src/main/java/org/thoughtcrime/securesms/notifications/NotificationCenter.java @@ -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";