mirror of
https://github.com/billsonnn/nitro-react.git
synced 2025-01-18 21:36:27 +01:00
Messenger update
This commit is contained in:
parent
1c1317eadb
commit
49222a9406
@ -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}`);
|
||||
}
|
||||
|
@ -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>
|
||||
|
@ -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 }>
|
||||
|
Loading…
Reference in New Issue
Block a user