From 6c6a4df339e809707b020391751b6bf4a552f9a6 Mon Sep 17 00:00:00 2001 From: virvar Date: Sat, 19 Mar 2016 11:53:09 +0300 Subject: [PATCH] User identity load on first run --- src/messenger/android/login.cljs | 2 +- src/messenger/services/protocol.cljs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/messenger/android/login.cljs b/src/messenger/android/login.cljs index 67f25da956..17ab669894 100644 --- a/src/messenger/android/login.cljs +++ b/src/messenger/android/login.cljs @@ -77,7 +77,7 @@ (text {:style {:marginVertical 10 :textAlign "center"}} "Sign up")))) - (when loading + (when (or loading (not user-identity)) (spinner {:visible true})))))) (def login (om/factory Login)) diff --git a/src/messenger/services/protocol.cljs b/src/messenger/services/protocol.cljs index b48d38a5fe..120d8a0cba 100644 --- a/src/messenger/services/protocol.cljs +++ b/src/messenger/services/protocol.cljs @@ -1,6 +1,7 @@ (ns messenger.services.protocol (:require [messenger.models.protocol :refer [set-initialized update-identity]] + [messenger.comm.intercom :refer [load-user-identity]] [syng-im.utils.logging :as log])) (defmulti protocol (fn [state id args] @@ -10,6 +11,7 @@ [state id {:keys [identity] :as args}] (log/info "handling " id "args = " args) (update-identity identity) + (load-user-identity) (set-initialized true)) (defn protocol-handler [state [id args]]