diff --git a/lib/pages/chat/chat.dart b/lib/pages/chat/chat.dart index e7990a9f..a9091bb6 100644 --- a/lib/pages/chat/chat.dart +++ b/lib/pages/chat/chat.dart @@ -549,10 +549,11 @@ class ChatController extends State { ) == OkCancelResult.ok; if (!confirmed) return; - for (final event in selectedEvents) { - await showFutureLoadingDialog( - context: context, - future: () async { + await showFutureLoadingDialog( + context: context, + future: () => Future.wait( + selectedEvents.map( + (event) async { if (event.status.isSent) { if (event.canRedact) { await event.redactEvent(); @@ -569,8 +570,11 @@ class ChatController extends State { } else { await event.remove(); } - }); - } + }, + ), + ), + ); + setState(() { showEmojiPicker = false; selectedEvents.clear();