From bb3865757b853dedbb4d865827f046f13482fe86 Mon Sep 17 00:00:00 2001 From: Krille Date: Wed, 6 Mar 2024 16:05:57 +0100 Subject: [PATCH] chore: Follow up dismiss notifications logic --- lib/utils/push_helper.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/utils/push_helper.dart b/lib/utils/push_helper.dart index 2f4400b94..d30c1ba76 100644 --- a/lib/utils/push_helper.dart +++ b/lib/utils/push_helper.dart @@ -116,7 +116,9 @@ Future _tryPushHelper( notification.counts?.unread == 0) { await flutterLocalNotificationsPlugin.cancelAll(); } else { + // Make sure client is fully loaded and synced before dismiss notifications: await client.roomsLoading; + await client.oneShotSync(); final activeNotifications = await flutterLocalNotificationsPlugin.getActiveNotifications(); for (final activeNotification in activeNotifications) {