From 4a5623285a78a236013cdc21cb9e02631875f6bf Mon Sep 17 00:00:00 2001 From: virvar Date: Tue, 10 May 2016 12:31:48 +0300 Subject: [PATCH] Set signed-up at init db Former-commit-id: 8324cf4109e1d77d3ee574ef6351e9f4df252d9b --- src/syng_im/handlers.cljs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/syng_im/handlers.cljs b/src/syng_im/handlers.cljs index 5e8611f4be..9d6a299f56 100644 --- a/src/syng_im/handlers.cljs +++ b/src/syng_im/handlers.cljs @@ -2,6 +2,8 @@ (:require [re-frame.core :refer [register-handler after dispatch debug enrich]] [schema.core :as s :include-macros true] + [syng-im.persistence.simple-kv-store :as kv] + [syng-im.protocol.state.storage :as storage] [syng-im.db :as db :refer [app-db schema]] [syng-im.protocol.api :refer [init-protocol]] [syng-im.protocol.protocol-handler :refer [make-handler]] @@ -75,7 +77,9 @@ ;; -- Common -------------------------------------------------------------- (register-handler :initialize-db - (fn [_ _] app-db)) + (fn [_ _] + (assoc app-db + :signed-up (storage/get kv/kv-store :signed-up)))) (register-handler :set-loading (fn [db [_ value]]