From ab4fb8030d5630be4c39eed2a7f8182958ec97d6 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Tue, 11 Oct 2016 19:23:52 +0200 Subject: [PATCH] Sort image collections by name instead by id. --- src/uxbox/main/ui/dashboard/images.cljs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/uxbox/main/ui/dashboard/images.cljs b/src/uxbox/main/ui/dashboard/images.cljs index d4e333589f..d8352e91ce 100644 --- a/src/uxbox/main/ui/dashboard/images.cljs +++ b/src/uxbox/main/ui/dashboard/images.cljs @@ -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)))))]