Add better naming to newly created icon collections.

This commit is contained in:
Andrey Antukh
2016-10-21 00:17:08 +02:00
parent 19ebf65c68
commit 7690a088ab

View File

@@ -104,8 +104,8 @@
(defrecord CreateCollection []
rs/WatchEvent
(-apply-watch [_ state s]
(let [coll {:name "Unnamed collection"
:id (uuid/random)}]
(let [name (str "Unnamed Collection (" (gensym "c") ")")
coll {:name name}]
(->> (rp/req :create/icon-collection coll)
(rx/map :payload)
(rx/map collection-created)))))