[#14959] Reschedule messages deletion broadcast on new deletion

This commit is contained in:
Roman Volosovskyi 2023-02-02 18:13:13 +01:00
parent 77a798530d
commit e4722e05f3
No known key found for this signature in database
GPG Key ID: 0238A4B5ECEE70DE
1 changed files with 5 additions and 3 deletions

View File

@ -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]}