Data randomly remains in composer after sending a message #18172 (#21262)

This commit is contained in:
flexsurfer 2024-09-13 14:14:16 +02:00 committed by GitHub
parent ac8b06b6bf
commit 77ff5b473b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -6,6 +6,7 @@
[status-im.contexts.chat.messenger.composer.link-preview.events :as link-preview] [status-im.contexts.chat.messenger.composer.link-preview.events :as link-preview]
[status-im.contexts.chat.messenger.messages.transport.events :as messages.transport] [status-im.contexts.chat.messenger.messages.transport.events :as messages.transport]
[taoensso.timbre :as log] [taoensso.timbre :as log]
[utils.debounce :as debounce]
[utils.emojilib :as emoji] [utils.emojilib :as emoji]
[utils.i18n :as i18n] [utils.i18n :as i18n]
[utils.re-frame :as rf] [utils.re-frame :as rf]
@ -262,6 +263,8 @@
[{{:keys [current-chat-id] :as db} :db :as cofx}] [{{:keys [current-chat-id] :as db} :db :as cofx}]
(let [{:keys [input-text metadata]} (get-in db [:chat/inputs current-chat-id]) (let [{:keys [input-text metadata]} (get-in db [:chat/inputs current-chat-id])
editing-message (:editing-message metadata)] editing-message (:editing-message metadata)]
(debounce/clear :link-preview/unfurl-urls)
(debounce/clear :mention/on-change-text)
(if editing-message (if editing-message
(send-edited-message cofx input-text editing-message) (send-edited-message cofx input-text editing-message)
(send-messages cofx input-text current-chat-id)))) (send-messages cofx input-text current-chat-id))))