From d6bd685703fc803c6c3b7b1c8fc4efaac1ea91dd Mon Sep 17 00:00:00 2001 From: Roman Volosovskyi Date: Mon, 25 Feb 2019 17:39:21 +0200 Subject: [PATCH] [#7537] fix Contact stuck on login screen Signed-off-by: Igor Mandrigin --- src/status_im/init/core.cljs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/status_im/init/core.cljs b/src/status_im/init/core.cljs index 1067b5caba..22c3ceeb86 100644 --- a/src/status_im/init/core.cljs +++ b/src/status_im/init/core.cljs @@ -201,8 +201,19 @@ (defn login-only-events [cofx address stored-pns] (fx/merge cofx - {:notifications/request-notifications-permissions nil} - (navigation/navigate-to-cofx :home nil) + (cond-> + {:notifications/request-notifications-permissions nil} + + platform/ios? + ;; on ios navigation state might be not initialized yet when + ;; navigate-to call happens. + ;; That's why it should be delayed a bit. + ;; TODO(rasom): revisit this later and find better solution + (assoc :dispatch-later + [{:ms 1 + :dispatch [:navigate-to :home]}])) + (when-not platform/ios? + (navigation/navigate-to-cofx :home nil)) (notifications/process-stored-event address stored-pns) (when platform/desktop? (chat-model/update-dock-badge-label))))