Skip to content

Commit

Permalink
set min height for shared chats in profile view
Browse files Browse the repository at this point in the history
fixes #4092
  • Loading branch information
Simon-Laux committed Aug 24, 2024
1 parent 931c9cc commit f7f5b55
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/frontend/src/components/dialogs/ViewProfile/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,11 @@ export function ViewProfileInner({
avatarPath = selfChatAvatar
}

const mutualChatsMinItems = 5
const mutualChatsMinHeight =
CHATLISTITEM_CHAT_HEIGHT *
Math.max(Math.min(mutualChatsMinItems, chatListIds.length), 1)

return (
<>
<div>
Expand Down Expand Up @@ -292,7 +297,10 @@ export function ViewProfileInner({
{!(isDeviceChat || isSelfChat) && (
<>
<div className='group-separator'>{tx('profile_shared_chats')}</div>
<div className='mutual-chats' style={{ flexGrow: 1 }}>
<div
className='mutual-chats'
style={{ flexGrow: 1, minHeight: mutualChatsMinHeight }}
>
<AutoSizer>
{({ width, height }) => (
<ChatListPart
Expand Down

0 comments on commit f7f5b55

Please sign in to comment.