[fix] crash with creation and invitation to 1 letter group chat
Signed-off-by: yenda <eric@status.im>
This commit is contained in:
parent
48affbc918
commit
aeb29e38b0
|
@ -11,7 +11,15 @@
|
|||
(when-not (string/blank? name)
|
||||
[react/view (:default-chat-icon styles)
|
||||
[react/text {:style (:default-chat-icon-text styles)}
|
||||
(string/capitalize (second name))]]))
|
||||
;; TODO: for now we check if the first letter is a #
|
||||
;; which means it is most likely a public chat and
|
||||
;; use the second letter if that is the case
|
||||
;; a broader refactoring should clean up upstream params
|
||||
;; for default-chat-icon
|
||||
(string/capitalize (if (and (= "#" (first name))
|
||||
(< 1 (count name)))
|
||||
(second name)
|
||||
(first name)))]]))
|
||||
|
||||
(defn dapp-badge [{:keys [online-view-wrapper online-view online-dot-left online-dot-right]}]
|
||||
[react/view online-view-wrapper
|
||||
|
|
Loading…
Reference in New Issue