check empty :preview
This commit is contained in:
parent
dfcf7cd47e
commit
3e60fd36a0
|
@ -63,9 +63,10 @@
|
||||||
[text {:style st/command-name}
|
[text {:style st/command-name}
|
||||||
(str "!" (:name command))]]]
|
(str "!" (:name command))]]]
|
||||||
;; todo doesn't reflect design
|
;; todo doesn't reflect design
|
||||||
[view (st/command-image-view command)
|
(when-let [icon (:icon command)]
|
||||||
[image {:source {:uri (:icon command)}
|
[view (st/command-image-view command)
|
||||||
:style st/command-image}]]
|
[image {:source {:uri icon}
|
||||||
|
:style st/command-image}]])
|
||||||
(if preview
|
(if preview
|
||||||
preview
|
preview
|
||||||
[text {:style st/command-text}
|
[text {:style st/command-text}
|
||||||
|
|
|
@ -56,8 +56,9 @@
|
||||||
(if (command-type? content-type)
|
(if (command-type? content-type)
|
||||||
(-> message
|
(-> message
|
||||||
(update :content str-to-map)
|
(update :content str-to-map)
|
||||||
(assoc :rendered-preview (generate-hiccup
|
(assoc :rendered-preview (when preview
|
||||||
(read-string preview)))
|
(generate-hiccup
|
||||||
|
(read-string preview))))
|
||||||
(dissoc :preview))
|
(dissoc :preview))
|
||||||
message)))))
|
message)))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue