Messenger update

This commit is contained in:
Bill 2022-03-15 13:34:46 -04:00
parent 1c1317eadb
commit 49222a9406
3 changed files with 6 additions and 6 deletions

View File

@ -1,7 +1,7 @@
import { CreateLinkEvent } from '..';
export function OpenMessengerChat(friendId: number = -1): void
export function OpenMessengerChat(friendId: number = 0): void
{
if(friendId === -1) CreateLinkEvent('friends/messenger/open');
if(friendId === 0) CreateLinkEvent('friends/messenger/open');
else CreateLinkEvent(`friends/messenger/${friendId}`);
}

View File

@ -62,9 +62,7 @@ export const FriendsMessengerThreadGroup: FC<FriendsMessengerThreadGroupProps> =
</Base>
<Base className={ 'bg-light text-black border-radius mb-2 rounded py-1 px-2 messages-group-' + (isOwnChat ? 'right' : 'left') }>
<Base className='fw-bold'>
{
(isOwnChat) && GetSessionDataManager().userName
}
{ (isOwnChat) && GetSessionDataManager().userName }
{ (!isOwnChat) && ((group.type === GroupType.GROUP_CHAT) ? getGroupChatData(group.chats[0].extraData).username : thread.participant.name)
}
</Base>

View File

@ -212,6 +212,8 @@ export const FriendsMessengerView: FC<{}> = props =>
const activeThread = messageThreads[activeThreadIndex];
if(!activeThread) return;
if(activeThread.unread)
{
messagesBox.current.scrollTop = messagesBox.current.scrollHeight;
@ -281,7 +283,7 @@ export const FriendsMessengerView: FC<{}> = props =>
</Column>
</Column>
<Column size={ 8 } overflow="hidden">
{ (activeThreadIndex >= 0) &&
{ visibleThreads && (visibleThreads.length > 0) && (activeThreadIndex >= 0) &&
<>
<Text bold center>{ LocalizeText('messenger.window.separator', [ 'FRIEND_NAME' ], [ messageThreads[activeThreadIndex].participant.name ]) }</Text>
<Flex alignItems="center" justifyContent="between" gap={ 1 }>