chore: Follow up dismiss notifications logic

This commit is contained in:
Krille 2024-03-06 16:05:57 +01:00
parent 0eaa7aa73e
commit bb3865757b
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652

View file

@ -116,7 +116,9 @@ Future<void> _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) {