mirror of
https://github.com/hexastack/hexabot
synced 2024-12-28 06:42:23 +00:00
Merge pull request #397 from Hexastack/fix/sequence-messages-not-displaying
Fix/sequence messages not displaying
This commit is contained in:
commit
3e04e99f3e
@ -249,7 +249,10 @@ const ChatProvider: React.FC<{
|
|||||||
newIOMessage.delivery = true;
|
newIOMessage.delivery = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
setMessages([...messages, newIOMessage as TMessage]);
|
setMessages((prevMessages) => [
|
||||||
|
...prevMessages,
|
||||||
|
newIOMessage as TMessage,
|
||||||
|
]);
|
||||||
setScroll(0);
|
setScroll(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -271,7 +274,8 @@ const ChatProvider: React.FC<{
|
|||||||
} else {
|
} else {
|
||||||
setSuggestions([]);
|
setSuggestions([]);
|
||||||
}
|
}
|
||||||
isOpen || updateNewMessagesCount(newMessagesCount + 1);
|
isOpen ||
|
||||||
|
updateNewMessagesCount((prevMessagesCount) => prevMessagesCount + 1);
|
||||||
settings.alwaysScrollToBottom && setScroll(101); // @hack
|
settings.alwaysScrollToBottom && setScroll(101); // @hack
|
||||||
setOutgoingMessageState(OutgoingMessageState.sent);
|
setOutgoingMessageState(OutgoingMessageState.sent);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user