From 6cdc446e4435aa0e6046877c7b898f234df889d9 Mon Sep 17 00:00:00 2001 From: John Ngei Date: Wed, 5 Jun 2024 14:24:59 +0200 Subject: [PATCH] fix white screen when navigating back from a channel (#20326) --- src/status_im/contexts/chat/events.cljs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/status_im/contexts/chat/events.cljs b/src/status_im/contexts/chat/events.cljs index 85643b06da..a116deb762 100644 --- a/src/status_im/contexts/chat/events.cljs +++ b/src/status_im/contexts/chat/events.cljs @@ -202,7 +202,8 @@ {:events [:chat/navigate-to-chat]} [{db :db :as cofx} chat-id animation] (rf/merge cofx - {:dispatch [(if animation :shell/navigate-to :navigate-to) :chat chat-id animation]} + (when-not (:current-chat-id db) + {:dispatch [(if animation :shell/navigate-to :navigate-to) :chat chat-id animation]}) (close-chat chat-id) (force-close-chat chat-id) (fn [{:keys [db]}]