mirror of
https://github.com/unclebob/more-speech.git
synced 2024-09-30 02:21:02 +00:00
improve the way avatars are rendered.
This commit is contained in:
parent
d1d24f8c8e
commit
f419eb049c
@ -333,11 +333,13 @@
|
||||
(text! replies-label "Replies▶"))
|
||||
|
||||
|
||||
(let [avatar-label (select main-frame [:#avatar-id])]
|
||||
(future (config! avatar-label
|
||||
:text (if (some? (:picture profile))
|
||||
(format "<html><img src=\"%s\" width=\"100\" height=\"100\"></html>" (:picture profile))
|
||||
"<html><img src=\"http://cleancoder.com/images/cleancodelogo.png\" width=\"100\" height=\"100\"></html>"))))
|
||||
(let [avatar-label (select main-frame [:#avatar-id])
|
||||
picture (:picture profile)]
|
||||
(when new-id?
|
||||
(config! avatar-label :text "<html><img src=\"https://www.drodd.com/images14/white15.jpg\" width=\"100\" height=\"100\"></html>"))
|
||||
(when (some? picture)
|
||||
(future (config! avatar-label
|
||||
:text (format "<html><img src=\"%s\" width=\"100\" height=\"100\"></html>" picture)))))
|
||||
(text! subject-label (formatters/get-subject (:tags event)))
|
||||
(text! relays-label (format "%d %s"
|
||||
(count (:relays event))
|
||||
|
@ -32,8 +32,7 @@
|
||||
(defn make-sorted-listbox-items [ids]
|
||||
(sort-by first
|
||||
(map #(vector (formatters/format-user-id % 70 40) %)
|
||||
ids))
|
||||
)
|
||||
ids)))
|
||||
|
||||
(defn render-listbox-item [widget item]
|
||||
(let [value (:value item)]
|
||||
|
Loading…
Reference in New Issue
Block a user