Don't swap in new client states as they come, only in handler

This commit is contained in:
Nicholas Kariniemi 2014-10-10 22:15:28 +03:00
parent 16b61063ec
commit fd1f9bddef

View file

@ -95,8 +95,6 @@
(add-watch states :render (fn [_ _ _ new-states]
(let [new-state (sync/get-current-state new-states)]
(a/put! >view new-state))))
(a/pipe (a/map< (fn [s]
(swap! states sync/add-history-state s)
{:type :new-state :state s}) <view) <remote)
(a/pipe (a/map< (fn [s] {:type :new-state :state s}) <view) <remote)
(make-client-agent <remote >remote states)
(a/put! >remote message/full-sync-request)))