From 8aa1cadc663642adb257df499904a59a062039b1 Mon Sep 17 00:00:00 2001 From: Parvesh Monu Date: Wed, 3 Jul 2024 13:02:11 +0530 Subject: [PATCH] fix chat screen design issues (#20621) --- .../chat/home/chat_list_item/view.cljs | 29 ++++++++++--------- src/status_im/contexts/chat/home/view.cljs | 3 +- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/status_im/contexts/chat/home/chat_list_item/view.cljs b/src/status_im/contexts/chat/home/chat_list_item/view.cljs index 9c8c65dc15..83f75b3448 100644 --- a/src/status_im/contexts/chat/home/chat_list_item/view.cljs +++ b/src/status_im/contexts/chat/home/chat_list_item/view.cljs @@ -173,20 +173,21 @@ (defn avatar-view [{:keys [contact chat-id full-name color muted? image]}] - (if contact ; `contact` is passed when it's not a group chat - (let [online? (rf/sub [:visibility-status-updates/online? chat-id]) - photo-path (rf/sub [:chats/photo-path chat-id])] - [quo/user-avatar - (cond-> {:full-name full-name - :size :small - :online? online? - :profile-picture photo-path} - muted? - (assoc :ring? false))]) - [quo/group-avatar - {:customization-color color - :picture (when image {:uri image}) - :size :size-32}])) + [rn/view {:style {:justify-content :center}} + (if contact ; `contact` is passed when it's not a group chat + (let [online? (rf/sub [:visibility-status-updates/online? chat-id]) + photo-path (rf/sub [:chats/photo-path chat-id])] + [quo/user-avatar + (cond-> {:full-name full-name + :size :small + :online? online? + :profile-picture photo-path} + muted? + (assoc :ring? false))]) + [quo/group-avatar + {:customization-color color + :picture (when image {:uri image}) + :size :size-32}])]) (defn- notification-layout [child] diff --git a/src/status_im/contexts/chat/home/view.cljs b/src/status_im/contexts/chat/home/view.cljs index 18f0e5a802..07ee48ff6b 100644 --- a/src/status_im/contexts/chat/home/view.cljs +++ b/src/status_im/contexts/chat/home/view.cljs @@ -66,7 +66,8 @@ (chat-list-item/chat-list-item item theme)) :scroll-event-throttle 8 :content-container-style {:padding-bottom - jump-to.constants/floating-shell-button-height} + jump-to.constants/floating-shell-button-height + :padding-top 8} :on-scroll #(common.banner/set-scroll-shared-value {:scroll-input (oops/oget % "nativeEvent.contentOffset.y") :shared-value scroll-shared-value})}])))