From 728d9d01c500ab1d489f93f5e006e9d83b881a5b Mon Sep 17 00:00:00 2001 From: Parvesh Monu Date: Mon, 10 Jul 2023 15:33:31 +0530 Subject: [PATCH] fix App is not opened on the last viewed chat with biometric login enabled (#16516) --- src/status_im/events.cljs | 10 +--------- src/status_im2/contexts/chat/events.cljs | 4 +++- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/status_im/events.cljs b/src/status_im/events.cljs index a40c846f07..6ae282ef00 100644 --- a/src/status_im/events.cljs +++ b/src/status_im/events.cljs @@ -198,16 +198,8 @@ :key-uid (get-in cofx [:db :profile/profile :key-uid])} :db (assoc db :screens/was-focused-once? true)} - (= :login view-id) - {} - (not (get db :screens/was-focused-once?)) - {:db (assoc db :screens/was-focused-once? true)} - - :else - {::async-storage/set! {:chat-id nil - :key-uid nil} - :db (assoc db :screens/was-focused-once? true)}) + {:db (assoc db :screens/was-focused-once? true)}) #(case view-id :keycard-settings (keycard/settings-screen-did-load %) :reset-card (keycard/reset-card-screen-did-load %) diff --git a/src/status_im2/contexts/chat/events.cljs b/src/status_im2/contexts/chat/events.cljs index 05e636ec31..fbfb398616 100644 --- a/src/status_im2/contexts/chat/events.cljs +++ b/src/status_im2/contexts/chat/events.cljs @@ -174,7 +174,9 @@ (chat.state/reset-visible-item) (rf/merge cofx (merge - {:db (dissoc db :current-chat-id)} + {:db (dissoc db :current-chat-id) + ::async-storage/set! {:chat-id nil + :key-uid nil}} (let [community-id (get-in db [:chats chat-id :community-id])] ;; When navigating back from community chat to community, update switcher card ;; A close chat event is also called while opening any chat.