fix chat screen design issues (#20621)

This commit is contained in:
Parvesh Monu 2024-07-03 13:02:11 +05:30 committed by GitHub
parent 91c22df498
commit 8aa1cadc66
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 17 additions and 15 deletions

View File

@ -173,20 +173,21 @@
(defn avatar-view (defn avatar-view
[{:keys [contact chat-id full-name color muted? image]}] [{:keys [contact chat-id full-name color muted? image]}]
(if contact ; `contact` is passed when it's not a group chat [rn/view {:style {:justify-content :center}}
(let [online? (rf/sub [:visibility-status-updates/online? chat-id]) (if contact ; `contact` is passed when it's not a group chat
photo-path (rf/sub [:chats/photo-path chat-id])] (let [online? (rf/sub [:visibility-status-updates/online? chat-id])
[quo/user-avatar photo-path (rf/sub [:chats/photo-path chat-id])]
(cond-> {:full-name full-name [quo/user-avatar
:size :small (cond-> {:full-name full-name
:online? online? :size :small
:profile-picture photo-path} :online? online?
muted? :profile-picture photo-path}
(assoc :ring? false))]) muted?
[quo/group-avatar (assoc :ring? false))])
{:customization-color color [quo/group-avatar
:picture (when image {:uri image}) {:customization-color color
:size :size-32}])) :picture (when image {:uri image})
:size :size-32}])])
(defn- notification-layout (defn- notification-layout
[child] [child]

View File

@ -66,7 +66,8 @@
(chat-list-item/chat-list-item item theme)) (chat-list-item/chat-list-item item theme))
:scroll-event-throttle 8 :scroll-event-throttle 8
:content-container-style {:padding-bottom :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 :on-scroll #(common.banner/set-scroll-shared-value
{:scroll-input (oops/oget % "nativeEvent.contentOffset.y") {:scroll-input (oops/oget % "nativeEvent.contentOffset.y")
:shared-value scroll-shared-value})}]))) :shared-value scroll-shared-value})}])))