Set signed-up at init db

Former-commit-id: 8324cf4109
This commit is contained in:
virvar 2016-05-10 12:31:48 +03:00
parent d0f7dc8539
commit 4a5623285a
1 changed files with 5 additions and 1 deletions

View File

@ -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]]