From 6ef113e82162cbb4c71d9f755d9f6dc27b8a5835 Mon Sep 17 00:00:00 2001 From: Parvesh Monu Date: Tue, 5 Dec 2023 22:27:03 +0530 Subject: [PATCH] fix messages are marked as read automatically in 1-1/group chats after opening a link (#18066) --- src/status_im2/navigation/events.cljs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/status_im2/navigation/events.cljs b/src/status_im2/navigation/events.cljs index b8b8cd9aa6..643c436d04 100644 --- a/src/status_im2/navigation/events.cljs +++ b/src/status_im2/navigation/events.cljs @@ -60,12 +60,15 @@ (rf/defn pop-to-root {:events [:pop-to-root]} [{:keys [db]} tab] - {:pop-to-root-fx tab - :db (-> db - (dissoc :shell/floating-screens) - (dissoc :shell/loaded-screens) - (assoc :view-id (or @shell.state/selected-stack-id :shell))) - :effects.shell/pop-to-root nil}) + (merge + {:pop-to-root-fx tab + :db (-> db + (dissoc :shell/floating-screens) + (dissoc :shell/loaded-screens) + (assoc :view-id (or @shell.state/selected-stack-id :shell))) + :effects.shell/pop-to-root nil} + (when (:current-chat-id db) + {:dispatch-n [[:chat/close]]}))) (rf/defn init-root {:events [:init-root]}