high importance and high priority for notifications

This commit is contained in:
Henry Hiles 2026-11-25 15:18:07 -05:00
commit 23d77ddc60
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs

View file

@ -48,6 +48,12 @@ class NotificationController
if (details.payload case final payload?) _open(payload); if (details.payload case final payload?) _open(payload);
}, },
); );
await notifications
.resolvePlatformSpecificImplementation<
AndroidFlutterLocalNotificationsPlugin
>()
?.deleteNotificationChannel(channelId: "messages");
} }
if (Platform.isLinux) { if (Platform.isLinux) {
@ -93,6 +99,8 @@ class NotificationController
static const _androidGroup = "nexus.federated.nexus.MESSAGES"; static const _androidGroup = "nexus.federated.nexus.MESSAGES";
static const _summaryPayload = "summary"; static const _summaryPayload = "summary";
static const _messagesChannel = "messages_v2";
static const _shownKey = "shownNotifications"; static const _shownKey = "shownNotifications";
/// IDs of the notifications shown, by thread. Stored, since they're often /// IDs of the notifications shown, by thread. Stored, since they're often
@ -333,8 +341,10 @@ class NotificationController
styleInformation: BigTextStyleInformation(body), styleInformation: BigTextStyleInformation(body),
) )
: .new( : .new(
"messages", _messagesChannel,
"Messages", "Messages",
importance: .high,
priority: .high,
groupKey: _androidGroup, groupKey: _androidGroup,
subText: subtitle, subText: subtitle,
silent: !sound, silent: !sound,
@ -386,8 +396,9 @@ class NotificationController
payload: _summaryPayload, payload: _summaryPayload,
notificationDetails: const .new( notificationDetails: const .new(
android: .new( android: .new(
"messages", _messagesChannel,
"Messages", "Messages",
importance: .high,
groupKey: _androidGroup, groupKey: _androidGroup,
setAsGroupSummary: true, setAsGroupSummary: true,
groupAlertBehavior: .children, groupAlertBehavior: .children,