mirror of
https://github.com/penpot/penpot.git
synced 2025-02-13 18:48:37 -05:00
Fix image initialization event.
This commit is contained in:
parent
934fcba179
commit
5762ee0bf3
1 changed files with 4 additions and 4 deletions
|
@ -26,14 +26,14 @@
|
||||||
(let [type (or type :builtin)
|
(let [type (or type :builtin)
|
||||||
id (or id (if (= type :builtin) 1 nil))
|
id (or id (if (= type :builtin) 1 nil))
|
||||||
data {:type type :id id :selected #{}}]
|
data {:type type :id id :selected #{}}]
|
||||||
|
(println "initialize:" data)
|
||||||
(-> state
|
(-> state
|
||||||
(assoc-in [:dashboard :images] data)
|
(assoc-in [:dashboard :images] data)
|
||||||
(assoc-in [:dashboard :section] :dashboard/images))))
|
(assoc-in [:dashboard :section] :dashboard/images))))
|
||||||
|
|
||||||
rs/WatchEvent
|
rs/WatchEvent
|
||||||
(-apply-watch [_ state s]
|
(-apply-watch [_ state s]
|
||||||
(rx/merge
|
(rx/merge (rx/of (fetch-collections))
|
||||||
(rx/of (fetch-collections))
|
|
||||||
(when (uuid? id)
|
(when (uuid? id)
|
||||||
(rx/of (fetch-images id))))))
|
(rx/of (fetch-images id))))))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue