mirror of
https://github.com/status-im/status-mobile.git
synced 2025-03-01 08:40:50 +00:00
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
|
(defn- initials
|
||||||
[full-name size color]
|
[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
|
[text/text
|
||||||
{:accessibility-label :initials
|
{:accessibility-label :initials
|
||||||
:size :paragraph-2
|
:size :paragraph-2
|
||||||
:weight :semi-bold
|
:weight :semi-bold
|
||||||
:style {:color color}}
|
:style {:color color}}
|
||||||
(utils.string/get-initials full-name amount-initials)]))
|
(utils.string/get-initials channel-name amount-initials)]))
|
||||||
|
|
||||||
(defn- lock
|
(defn- lock
|
||||||
[locked? size]
|
[locked? size]
|
||||||
|
@ -14,10 +14,11 @@
|
|||||||
[status-im2.contexts.chat.messages.resolver.message-resolver :as resolver]))
|
[status-im2.contexts.chat.messages.resolver.message-resolver :as resolver]))
|
||||||
|
|
||||||
(defn- channel-card
|
(defn- channel-card
|
||||||
[{:keys [emoji channel-name customization-color] :as _community-channel}]
|
[{:keys [emoji channel-name customization-color]}]
|
||||||
[rn/view style/channel-card-container
|
[rn/view style/channel-card-container
|
||||||
[quo/channel-avatar
|
[quo/channel-avatar
|
||||||
{:emoji emoji
|
{:emoji emoji
|
||||||
|
:full-name channel-name
|
||||||
:customization-color customization-color}]
|
:customization-color customization-color}]
|
||||||
[rn/view style/channel-card-text-container
|
[rn/view style/channel-card-text-container
|
||||||
[quo/text
|
[quo/text
|
||||||
|
Loading…
x
Reference in New Issue
Block a user