chore: Remove Notification actions when using UnifiedPush
This commit is contained in:
parent
8d7f376112
commit
31b3758622
2 changed files with 7 additions and 1 deletions
|
|
@ -26,6 +26,7 @@ Future<void> pushHelper(
|
|||
L10n? l10n,
|
||||
String? activeRoomId,
|
||||
required FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin,
|
||||
bool useNotificationActions = true,
|
||||
}) async {
|
||||
try {
|
||||
await _tryPushHelper(
|
||||
|
|
@ -34,6 +35,7 @@ Future<void> pushHelper(
|
|||
l10n: l10n,
|
||||
activeRoomId: activeRoomId,
|
||||
flutterLocalNotificationsPlugin: flutterLocalNotificationsPlugin,
|
||||
useNotificationActions: useNotificationActions,
|
||||
);
|
||||
} catch (e, s) {
|
||||
Logs().e('Push Helper has crashed! Writing into temporary file', e, s);
|
||||
|
|
@ -69,6 +71,7 @@ Future<void> _tryPushHelper(
|
|||
L10n? l10n,
|
||||
String? activeRoomId,
|
||||
required FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin,
|
||||
bool useNotificationActions = true,
|
||||
}) async {
|
||||
final isBackgroundMessage = client == null;
|
||||
Logs().v(
|
||||
|
|
@ -278,7 +281,7 @@ Future<void> _tryPushHelper(
|
|||
importance: Importance.high,
|
||||
priority: Priority.max,
|
||||
groupKey: event.room.spaceParents.firstOrNull?.roomId ?? 'rooms',
|
||||
actions: event.type == EventTypes.RoomMember
|
||||
actions: event.type == EventTypes.RoomMember || !useNotificationActions
|
||||
? null
|
||||
: <AndroidNotificationAction>[
|
||||
AndroidNotificationAction(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue