From a93a3b6878b2fc7f6ae3b98ca1c084748475f5cc Mon Sep 17 00:00:00 2001 From: flexsurfer Date: Tue, 14 Jun 2022 15:15:33 +0200 Subject: [PATCH] fix close chat on tab (#13472) --- src/status_im/navigation/core.cljs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/status_im/navigation/core.cljs b/src/status_im/navigation/core.cljs index ff89088126..682681c08d 100644 --- a/src/status_im/navigation/core.cljs +++ b/src/status_im/navigation/core.cljs @@ -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)