Skip to content

Commit e6c0052

Browse files
[#17218] fix: android channel name ellipsize completely
1 parent fcbe6fe commit e6c0052

File tree

1 file changed

+8
-1
lines changed
  • src/status_im2/contexts/chat/messages/list

1 file changed

+8
-1
lines changed

src/status_im2/contexts/chat/messages/list/view.cljs

+8-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
[react-native.platform :as platform]
1010
[react-native.reanimated :as reanimated]
1111
[reagent.core :as reagent]
12+
[status-im.utils.core :as utils]
1213
[status-im.ui.screens.chat.group :as chat.group]
1314
[status-im.ui.screens.chat.message.gap :as message.gap]
1415
[status-im2.constants :as constants]
@@ -189,6 +190,12 @@
189190
(rf/dispatch [:pin-message/show-pins-bottom-sheet
190191
chat-id]))}]}]))
191192

193+
(defn- truncate-display-name
194+
[chat-name]
195+
(if platform/android?
196+
(utils/truncate-str chat-name 22)
197+
chat-name))
198+
192199
(defn f-list-footer
193200
[{:keys [chat scroll-y cover-bg-color on-layout]}]
194201
(let [{:keys [chat-id chat-name emoji chat-type
@@ -229,7 +236,7 @@
229236
:size :heading-1
230237
:style {:margin-top (if group-chat 54 12)}
231238
:number-of-lines 1}
232-
display-name
239+
(truncate-display-name display-name)
233240
[contact-icon contact]]]
234241
(when bio
235242
[quo/text {:style style/bio}

0 commit comments

Comments
 (0)