fix close chat on tab (#13472)

This commit is contained in:
flexsurfer 2022-06-14 15:15:33 +02:00 committed by GitHub
parent 430f322f95
commit a93a3b6878
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -284,8 +284,11 @@
comp (get tab-root-ids selected-tab-index)
tab-key (get (clojure.set/map-invert tab-key-idx) selected-tab-index)]
(re-frame/dispatch [:set :current-tab tab-key])
(when (and platform/android? (= @state/root-comp-id comp))
(.popToRoot Navigation (name comp)))
(when (= @state/root-comp-id comp)
(when (= :chat tab-key)
(re-frame/dispatch [:close-chat]))
(when platform/android?
(.popToRoot Navigation (name comp))))
(reset! state/root-comp-id comp)))))
;; OVERLAY (Popover and bottom sheets)