improve the way avatars are rendered.

This commit is contained in:
Robert C. Martin 2023-06-25 13:08:00 -05:00
parent d1d24f8c8e
commit f419eb049c
2 changed files with 8 additions and 7 deletions

View File

@ -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))

View File

@ -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)]