0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-04-01 09:31:26 -05:00

Sort image collections by name instead by id.

This commit is contained in:
Andrey Antukh 2016-10-11 19:23:52 +02:00
parent 61db7aeab9
commit ab4fb8030d

View file

@ -149,7 +149,7 @@
collections (cond->> (vals colls)
own? (filter #(= :own (:type %)))
builtin? (filter #(= :builtin (:type %)))
own? (sort-by :id))]
own? (sort-by :name))]
[:ul.library-elements
(when own?
[:li
@ -171,8 +171,8 @@
(let [xf (comp
(map second)
(filter #(= type (:type %))))
colls (into [] xf colls)
colls (sort-by :id colls)]
colls (->> (into [] xf colls)
(sort-by :name))]
(if-let [item (first colls)]
(rs/emit! (di/select-collection type (:id item)))
(rs/emit! (di/select-collection type)))))]