0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-10 09:08:31 -05:00

Fix image initialization event.

This commit is contained in:
Andrey Antukh 2016-10-06 22:54:59 +02:00
parent 934fcba179
commit 5762ee0bf3
No known key found for this signature in database
GPG key ID: 4DFEBCB8316A8B95

View file

@ -26,14 +26,14 @@
(let [type (or type :builtin)
id (or id (if (= type :builtin) 1 nil))
data {:type type :id id :selected #{}}]
(println "initialize:" data)
(-> state
(assoc-in [:dashboard :images] data)
(assoc-in [:dashboard :section] :dashboard/images))))
rs/WatchEvent
(-apply-watch [_ state s]
(rx/merge
(rx/of (fetch-collections))
(rx/merge (rx/of (fetch-collections))
(when (uuid? id)
(rx/of (fetch-images id))))))