0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-13 18:48:37 -05:00

Assign proper type to fetched image collections.

This commit is contained in:
Andrey Antukh 2016-11-22 18:04:08 +01:00
parent 417f90e677
commit c6b1263d33
No known key found for this signature in database
GPG key ID: 4DFEBCB8316A8B95

View file

@ -59,9 +59,9 @@
(defrecord CollectionsFetched [items]
rs/UpdateEvent
(-apply-update [_ state]
(reduce (fn [state item]
(let [id (:id item)
item (assoc item :type :own)]
(reduce (fn [state {:keys [id user] :as item}]
(let [type (if (uuid/zero? (:user item)) :builtin :own)
item (assoc item :type type)]
(assoc-in state [:images-collections id] item)))
state
items)))