mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2025-11-15 20:27:24 +01:00
fix: speed up event redaction
Signed-off-by: TheOneWithTheBraid <the-one@with-the-braid.cf>
This commit is contained in:
parent
5ee4514997
commit
b6819aa400
@ -549,10 +549,11 @@ class ChatController extends State<Chat> {
|
|||||||
) ==
|
) ==
|
||||||
OkCancelResult.ok;
|
OkCancelResult.ok;
|
||||||
if (!confirmed) return;
|
if (!confirmed) return;
|
||||||
for (final event in selectedEvents) {
|
await showFutureLoadingDialog(
|
||||||
await showFutureLoadingDialog(
|
context: context,
|
||||||
context: context,
|
future: () => Future.wait(
|
||||||
future: () async {
|
selectedEvents.map(
|
||||||
|
(event) async {
|
||||||
if (event.status.isSent) {
|
if (event.status.isSent) {
|
||||||
if (event.canRedact) {
|
if (event.canRedact) {
|
||||||
await event.redactEvent();
|
await event.redactEvent();
|
||||||
@ -569,8 +570,11 @@ class ChatController extends State<Chat> {
|
|||||||
} else {
|
} else {
|
||||||
await event.remove();
|
await event.remove();
|
||||||
}
|
}
|
||||||
});
|
},
|
||||||
}
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
setState(() {
|
setState(() {
|
||||||
showEmojiPicker = false;
|
showEmojiPicker = false;
|
||||||
selectedEvents.clear();
|
selectedEvents.clear();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user