fix messenger scroll

This commit is contained in:
dank074 2022-11-18 21:27:55 -06:00
parent c46dc66b4c
commit 40c1490394
2 changed files with 41 additions and 39 deletions

View File

@ -153,7 +153,7 @@
height: $messenger-height;
.layout-grid-item {
height: 50px;
min-height: 50px;
}
.friend-head {

View File

@ -110,27 +110,29 @@ export const FriendsMessengerView: FC<{}> = props =>
<NitroCardHeaderView headerText={ LocalizeText('messenger.window.title', [ 'OPEN_CHAT_COUNT' ], [ visibleThreads.length.toString() ]) } onCloseClick={ event => setIsVisible(false) } />
<NitroCardContentView>
<Grid overflow="hidden">
<Column size={ 4 }>
<Column size={ 4 } overflow="hidden">
<Text bold>{ LocalizeText('toolbar.icon.label.messenger') }</Text>
<Column fullHeight overflow="auto">
{ visibleThreads && (visibleThreads.length > 0) && visibleThreads.map(thread =>
{
return (
<LayoutGridItem key={ thread.threadId } itemActive={ (activeThread === thread) } onClick={ event => setActiveThreadId(thread.threadId) }>
{ thread.unread &&
<Column fit overflow="auto">
<Column>
{ visibleThreads && (visibleThreads.length > 0) && visibleThreads.map(thread =>
{
return (
<LayoutGridItem key={ thread.threadId } itemActive={ (activeThread === thread) } onClick={ event => setActiveThreadId(thread.threadId) }>
{ thread.unread &&
<LayoutItemCountView count={ thread.unreadCount } /> }
<Flex fullWidth alignItems="center" gap={ 1 }>
<Flex alignItems="center" className="friend-head px-1">
{ (thread.participant.id > 0) &&
<Flex fullWidth alignItems="center" gap={ 1 }>
<Flex alignItems="center" className="friend-head px-1">
{ (thread.participant.id > 0) &&
<LayoutAvatarImageView figure={ thread.participant.figure } headOnly={ true } direction={ 3 } /> }
{ (thread.participant.id <= 0) &&
{ (thread.participant.id <= 0) &&
<LayoutBadgeImageView isGroup={ true } badgeCode={ thread.participant.figure } /> }
</Flex>
<Text truncate grow>{ thread.participant.name }</Text>
</Flex>
<Text truncate grow>{ thread.participant.name }</Text>
</Flex>
</LayoutGridItem>
);
}) }
</LayoutGridItem>
);
}) }
</Column>
</Column>
</Column>
<Column size={ 8 } overflow="hidden">