Fix wrong state cleaning in logout.

This commit is contained in:
Andrey Antukh 2016-04-03 21:06:59 +03:00
parent ffc6c79ed7
commit d1fee179d5
2 changed files with 18 additions and 14 deletions

View file

@ -74,7 +74,7 @@
(defrecord Logout [] (defrecord Logout []
rs/UpdateEvent rs/UpdateEvent
(-apply-update [_ state] (-apply-update [_ state]
(assoc state :auth nil)) (st/get-initial-state))
rs/WatchEvent rs/WatchEvent
(-apply-watch [_ state s] (-apply-watch [_ state s]

View file

@ -13,8 +13,9 @@
(defonce state (atom {})) (defonce state (atom {}))
(defonce stream (defn get-initial-state
(rs/init {:dashboard {:project-order :name []
{:dashboard {:project-order :name
:project-filter ""} :project-filter ""}
:route nil :route nil
:auth (:uxbox/auth local-storage) :auth (:uxbox/auth local-storage)
@ -26,7 +27,10 @@
:colors-by-id {} :colors-by-id {}
:icons-by-id {} :icons-by-id {}
:projects-by-id {} :projects-by-id {}
:pages-by-id {}})) :pages-by-id {}})
(defonce stream
(rs/init (get-initial-state)))
(defn init (defn init
"Initialize the state materialization." "Initialize the state materialization."