From 741e40094b003258ac6e098d17f30bacb0a70690 Mon Sep 17 00:00:00 2001 From: Mohsen Ghafouri Date: Tue, 5 Sep 2023 14:40:05 +0300 Subject: [PATCH] [#16859] fix: community channel design review (#17178) --- src/status_im2/contexts/chat/messages/list/view.cljs | 7 +++++-- src/status_im2/contexts/chat/messages/navigation/view.cljs | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/status_im2/contexts/chat/messages/list/view.cljs b/src/status_im2/contexts/chat/messages/list/view.cljs index db7275c6a2..391738b2a7 100644 --- a/src/status_im2/contexts/chat/messages/list/view.cljs +++ b/src/status_im2/contexts/chat/messages/list/view.cljs @@ -187,9 +187,12 @@ (let [{:keys [chat-id chat-name emoji chat-type group-chat]} chat all-loaded? (rf/sub [:chats/all-loaded? chat-id]) - display-name (if (= chat-type constants/one-to-one-chat-type) + display-name (cond + (= chat-type constants/one-to-one-chat-type) (first (rf/sub [:contacts/contact-two-names-by-identity chat-id])) - (str emoji " " chat-name)) + (= chat-type constants/community-chat-type) + (str (when emoji (str emoji " ")) "# " chat-name) + :else (str emoji chat-name)) {:keys [bio]} (rf/sub [:contacts/contact-by-identity chat-id]) online? (rf/sub [:visibility-status-updates/online? chat-id]) contact (when-not group-chat diff --git a/src/status_im2/contexts/chat/messages/navigation/view.cljs b/src/status_im2/contexts/chat/messages/navigation/view.cljs index 367606c1f0..a9e80b85cf 100644 --- a/src/status_im2/contexts/chat/messages/navigation/view.cljs +++ b/src/status_im2/contexts/chat/messages/navigation/view.cljs @@ -23,9 +23,12 @@ chat-screen-loaded? (rf/sub [:shell/chat-screen-loaded?]) all-loaded? (when chat-screen-loaded? (rf/sub [:chats/all-loaded? (:chat-id chat)])) - display-name (if (= chat-type constants/one-to-one-chat-type) + display-name (cond + (= chat-type constants/one-to-one-chat-type) (first (rf/sub [:contacts/contact-two-names-by-identity chat-id])) - (str emoji " " chat-name)) + (= chat-type constants/community-chat-type) + (str (when emoji (str emoji " ")) "# " chat-name) + :else (str emoji chat-name)) online? (rf/sub [:visibility-status-updates/online? chat-id]) photo-path (rf/sub [:chats/photo-path chat-id]) opacity-animation (reanimated/interpolate scroll-y