[#7537] fix Contact stuck on login screen

Signed-off-by: Igor Mandrigin <i@mandrigin.ru>
This commit is contained in:
Roman Volosovskyi 2019-02-25 17:39:21 +02:00 committed by Igor Mandrigin
parent 229f5ae108
commit d6bd685703
No known key found for this signature in database
GPG Key ID: 4A0EDDE26E66BC8B
1 changed files with 13 additions and 2 deletions

View File

@ -201,8 +201,19 @@
(defn login-only-events [cofx address stored-pns] (defn login-only-events [cofx address stored-pns]
(fx/merge cofx (fx/merge cofx
(cond->
{:notifications/request-notifications-permissions nil} {:notifications/request-notifications-permissions nil}
(navigation/navigate-to-cofx :home 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) (notifications/process-stored-event address stored-pns)
(when platform/desktop? (when platform/desktop?
(chat-model/update-dock-badge-label)))) (chat-model/update-dock-badge-label))))