Compare commits
2 commits
main
...
copilot/fi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6ca15696db | ||
|
|
7bbafa788c |
4 changed files with 22 additions and 20 deletions
|
|
@ -112,7 +112,7 @@ class BackgroundPush {
|
|||
});
|
||||
}
|
||||
await _flutterLocalNotificationsPlugin.initialize(
|
||||
const InitializationSettings(
|
||||
initializationSettings: const InitializationSettings(
|
||||
android: AndroidInitializationSettings('notifications_icon'),
|
||||
iOS: DarwinInitializationSettings(),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -161,17 +161,17 @@ abstract class ClientManager {
|
|||
final flutterLocalNotificationsPlugin = FlutterLocalNotificationsPlugin();
|
||||
|
||||
await flutterLocalNotificationsPlugin.initialize(
|
||||
const InitializationSettings(
|
||||
initializationSettings: const InitializationSettings(
|
||||
android: AndroidInitializationSettings('notifications_icon'),
|
||||
iOS: DarwinInitializationSettings(),
|
||||
),
|
||||
);
|
||||
|
||||
flutterLocalNotificationsPlugin.show(
|
||||
0,
|
||||
title,
|
||||
body,
|
||||
const NotificationDetails(
|
||||
id: 0,
|
||||
title: title,
|
||||
body: body,
|
||||
notificationDetails: const NotificationDetails(
|
||||
android: AndroidNotificationDetails(
|
||||
'error_message',
|
||||
'Error Messages',
|
||||
|
|
|
|||
|
|
@ -196,7 +196,9 @@ Future<void> notificationTap(
|
|||
.timeout(const Duration(seconds: 3));
|
||||
final messagingStyleInformation =
|
||||
await AndroidFlutterLocalNotificationsPlugin()
|
||||
.getActiveNotificationMessagingStyle(room.id.hashCode);
|
||||
.getActiveNotificationMessagingStyle(
|
||||
notificationId: room.id.hashCode,
|
||||
);
|
||||
if (messagingStyleInformation == null) return;
|
||||
l10n ??= await lookupL10n(PlatformDispatcher.instance.locale);
|
||||
messagingStyleInformation.messages?.add(
|
||||
|
|
@ -214,10 +216,10 @@ Future<void> notificationTap(
|
|||
);
|
||||
|
||||
await FlutterLocalNotificationsPlugin().show(
|
||||
room.id.hashCode,
|
||||
room.getLocalizedDisplayname(MatrixLocals(l10n)),
|
||||
input,
|
||||
NotificationDetails(
|
||||
id: room.id.hashCode,
|
||||
title: room.getLocalizedDisplayname(MatrixLocals(l10n)),
|
||||
body: input,
|
||||
notificationDetails: NotificationDetails(
|
||||
android: AndroidNotificationDetails(
|
||||
AppConfig.pushNotificationsChannelId,
|
||||
l10n.incomingMessages,
|
||||
|
|
|
|||
|
|
@ -42,10 +42,10 @@ Future<void> pushHelper(
|
|||
|
||||
l10n ??= await lookupL10n(PlatformDispatcher.instance.locale);
|
||||
flutterLocalNotificationsPlugin.show(
|
||||
notification.roomId?.hashCode ?? 0,
|
||||
l10n.newMessageInFluffyChat,
|
||||
l10n.openAppToReadMessages,
|
||||
NotificationDetails(
|
||||
id: notification.roomId?.hashCode ?? 0,
|
||||
title: l10n.newMessageInFluffyChat,
|
||||
body: l10n.openAppToReadMessages,
|
||||
notificationDetails: NotificationDetails(
|
||||
iOS: const DarwinNotificationDetails(),
|
||||
android: AndroidNotificationDetails(
|
||||
AppConfig.pushNotificationsChannelId,
|
||||
|
|
@ -220,7 +220,7 @@ Future<void> _tryPushHelper(
|
|||
|
||||
final messagingStyleInformation = PlatformInfos.isAndroid
|
||||
? await AndroidFlutterLocalNotificationsPlugin()
|
||||
.getActiveNotificationMessagingStyle(id)
|
||||
.getActiveNotificationMessagingStyle(notificationId: id)
|
||||
: null;
|
||||
messagingStyleInformation?.messages?.add(newMessage);
|
||||
|
||||
|
|
@ -317,10 +317,10 @@ Future<void> _tryPushHelper(
|
|||
}
|
||||
|
||||
await flutterLocalNotificationsPlugin.show(
|
||||
id,
|
||||
title,
|
||||
body,
|
||||
platformChannelSpecifics,
|
||||
id: id,
|
||||
title: title,
|
||||
body: body,
|
||||
notificationDetails: platformChannelSpecifics,
|
||||
payload: FluffyChatPushPayload(
|
||||
client.clientName,
|
||||
event.room.id,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue