Add fallback letter on channel on the community card (#16863)
This commit is contained in:
parent
2869edafdd
commit
ff1ae2f4aa
|
@ -9,13 +9,14 @@
|
|||
|
||||
(defn- initials
|
||||
[full-name size color]
|
||||
(let [amount-initials (if (= size :size/l) 2 1)]
|
||||
(let [amount-initials (if (= size :size/l) 2 1)
|
||||
channel-name (string/replace full-name "#" "")]
|
||||
[text/text
|
||||
{:accessibility-label :initials
|
||||
:size :paragraph-2
|
||||
:weight :semi-bold
|
||||
:style {:color color}}
|
||||
(utils.string/get-initials full-name amount-initials)]))
|
||||
(utils.string/get-initials channel-name amount-initials)]))
|
||||
|
||||
(defn- lock
|
||||
[locked? size]
|
||||
|
|
|
@ -14,10 +14,11 @@
|
|||
[status-im2.contexts.chat.messages.resolver.message-resolver :as resolver]))
|
||||
|
||||
(defn- channel-card
|
||||
[{:keys [emoji channel-name customization-color] :as _community-channel}]
|
||||
[{:keys [emoji channel-name customization-color]}]
|
||||
[rn/view style/channel-card-container
|
||||
[quo/channel-avatar
|
||||
{:emoji emoji
|
||||
:full-name channel-name
|
||||
:customization-color customization-color}]
|
||||
[rn/view style/channel-card-text-container
|
||||
[quo/text
|
||||
|
|
Loading…
Reference in New Issue