Skip to content

Commit

Permalink
fix: show dialogs in thread message list (#2539)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinCupela authored Oct 18, 2024
1 parent d69b113 commit 43895d3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/components/MessageList/MessageList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,13 @@ const MessageListWithContext = <
}, [highlightedMessageId]);

const showEmptyStateIndicator = elements.length === 0 && !threadList;

const dialogManagerId = threadList
? 'message-list-dialog-manager-thread'
: 'message-list-dialog-manager';
return (
<MessageListContextProvider value={{ listElement, scrollToBottom }}>
<MessageListMainPanel>
<DialogManagerProvider id='message-list-dialog-manager'>
<DialogManagerProvider id={dialogManagerId}>
{!threadList && showUnreadMessagesNotification && (
<UnreadMessagesNotification unreadCount={channelUnreadUiState?.unread_messages} />
)}
Expand Down
6 changes: 5 additions & 1 deletion src/components/MessageList/VirtualizedMessageList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -434,10 +434,14 @@ const VirtualizedMessageListWithContext = <

if (!processedMessages) return null;

const dialogManagerId = threadList
? 'virtualized-message-list-dialog-manager-thread'
: 'virtualized-message-list-dialog-manager';

return (
<>
<MessageListMainPanel>
<DialogManagerProvider id='virtualized-message-list-dialog-manager'>
<DialogManagerProvider id={dialogManagerId}>
{!threadList && showUnreadMessagesNotification && (
<UnreadMessagesNotification unreadCount={channelUnreadUiState?.unread_messages} />
)}
Expand Down

0 comments on commit 43895d3

Please sign in to comment.