[#13433] Input field in chat view is not cleared after logging out (#13438)

This commit is contained in:
flexsurfer 2022-06-02 12:16:18 +02:00 committed by GitHub
parent 117810cf44
commit 8ed1797f44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -15,6 +15,7 @@
(let [key-uid (get-in db [:multiaccount :key-uid])] (let [key-uid (get-in db [:multiaccount :key-uid])]
(fx/merge cofx (fx/merge cofx
{:init-root-fx :progress {:init-root-fx :progress
:chat.ui/clear-inputs nil
:hide-popover nil :hide-popover nil
::logout nil ::logout nil
::multiaccounts/webview-debug-changed false ::multiaccounts/webview-debug-changed false

View File

@ -114,6 +114,13 @@
(defonce mentions-enabled (reagent/atom {})) (defonce mentions-enabled (reagent/atom {}))
(defonce chat-input-key (reagent/atom 1)) (defonce chat-input-key (reagent/atom 1))
(re-frame/reg-fx
:chat.ui/clear-inputs
(fn []
(reset! input-texts {})
(reset! mentions-enabled {})
(reset! chat-input-key 1)))
(defn force-text-input-update! (defn force-text-input-update!
"force-text-input-update! forces the "force-text-input-update! forces the
input to re-render, necessary when we are setting value" input to re-render, necessary when we are setting value"