BOD-14 Added virtualization for messages with known bug. Added messages geting marked as read.
This commit is contained in:
@@ -6,7 +6,11 @@ import LoadingSkeleton from "../loading-skeleton/loading-skeleton.component.jsx"
|
||||
import AlertComponent from "../alert/alert.component";
|
||||
import ChatConversationTitle from "../chat-conversation-title/chat-conversation-title.component";
|
||||
|
||||
export default function ChatConversationComponent({ subState, conversation }) {
|
||||
export default function ChatConversationComponent({
|
||||
subState,
|
||||
conversation,
|
||||
handleMarkConversationAsRead,
|
||||
}) {
|
||||
const [loading, error] = subState;
|
||||
|
||||
if (loading) return <LoadingSkeleton />;
|
||||
@@ -20,12 +24,13 @@ export default function ChatConversationComponent({ subState, conversation }) {
|
||||
conversation.messages_aggregate.aggregate.count) ||
|
||||
0;
|
||||
|
||||
const messages =
|
||||
(conversation && conversation.messages) ||
|
||||
[];
|
||||
const messages = (conversation && conversation.messages) || [];
|
||||
|
||||
return (
|
||||
<div className='chat-conversation'>
|
||||
<div
|
||||
className='chat-conversation'
|
||||
onMouseDown={handleMarkConversationAsRead}
|
||||
onKeyDown={handleMarkConversationAsRead}>
|
||||
<Badge count={unreadCount}>
|
||||
<Card size='small'>
|
||||
<ChatConversationTitle conversation={conversation} />
|
||||
|
||||
Reference in New Issue
Block a user