From e4722e05f3289d50349ebe4cf0b420e14b24f578 Mon Sep 17 00:00:00 2001 From: Roman Volosovskyi Date: Thu, 2 Feb 2023 18:13:13 +0100 Subject: [PATCH] [#14959] Reschedule messages deletion broadcast on new deletion --- .../contexts/chat/messages/delete_message/events.cljs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/status_im2/contexts/chat/messages/delete_message/events.cljs b/src/status_im2/contexts/chat/messages/delete_message/events.cljs index 168ab009ab..8c8b216589 100644 --- a/src/status_im2/contexts/chat/messages/delete_message/events.cljs +++ b/src/status_im2/contexts/chat/messages/delete_message/events.cljs @@ -90,9 +90,11 @@ :undo-on-press #(do (rf/dispatch [:chat.ui/undo-all-delete-message]) (rf/dispatch [:toasts/close :delete-message-for-everyone]))}]] - :utils/dispatch-later [{:dispatch [:chat.ui/delete-message-and-send - {:chat-id chat-id :message-id message-id}] - :ms undo-time-limit-ms}])))) + :utils/dispatch-later (mapv (fn [{:keys [chat-id message-id]}] + {:dispatch [:chat.ui/delete-message-and-send + {:chat-id chat-id :message-id message-id}] + :ms undo-time-limit-ms}) + existing-undos))))) (rf/defn undo {:events [:chat.ui/undo-delete-message]}