From c22ffb103298ae85389a920ac993806b5bd13ec2 Mon Sep 17 00:00:00 2001 From: andrey Date: Wed, 14 Apr 2021 16:16:51 +0200 Subject: [PATCH] [#11994] No chats on Home screen after reopening the app if appearance doesn't match the device settings (dark/light mode) Signed-off-by: andrey --- src/status_im/multiaccounts/login/core.cljs | 1 + src/status_im/ui/components/list/views.cljs | 4 +++- src/status_im/ui/screens/chat/views.cljs | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/status_im/multiaccounts/login/core.cljs b/src/status_im/multiaccounts/login/core.cljs index a6d4eec3b8..0ddff6ab9c 100644 --- a/src/status_im/multiaccounts/login/core.cljs +++ b/src/status_im/multiaccounts/login/core.cljs @@ -358,6 +358,7 @@ :pin :multiaccount) (assoc :logged-in-since now) + (assoc :view-id :home) (assoc :wallet/waiting-for-recent-history? true)) ::json-rpc/call [{:method "web3_clientVersion" diff --git a/src/status_im/ui/components/list/views.cljs b/src/status_im/ui/components/list/views.cljs index b9563a4c13..54be6e7110 100644 --- a/src/status_im/ui/components/list/views.cljs +++ b/src/status_im/ui/components/list/views.cljs @@ -75,7 +75,9 @@ (def memo-separator-fn (memoize (fn [separator default-separator?] - (reagent/as-element (or separator (when (and platform/ios? default-separator?) default-separator)))))) + (when-let [separator (or separator (when (and platform/ios? default-separator?) default-separator))] + (fn [] + (reagent/as-element separator)))))) (def memo-as-element (memoize diff --git a/src/status_im/ui/screens/chat/views.cljs b/src/status_im/ui/screens/chat/views.cljs index 1a8d96d7d8..73e73d8af8 100644 --- a/src/status_im/ui/screens/chat/views.cljs +++ b/src/status_im/ui/screens/chat/views.cljs @@ -331,7 +331,7 @@ set-active-panel (get-set-active-panel active-panel) on-close #(set-active-panel nil)] (reagent/create-class - {:component-will-unmount #(re-frame/dispatch [:close-chat]) + {:component-will-unmount #(re-frame/dispatch-sync [:close-chat]) :reagent-render (fn [] (let [{:keys [chat-id show-input? group-chat admins invitation-admin] :as chat}