Fix changing tabs marking conversation read
This commit is contained in:
parent
bddf1f432d
commit
29aa188c0f
2 changed files with 11 additions and 9 deletions
|
@ -3947,6 +3947,8 @@ function showConversation({
|
||||||
|
|
||||||
if (nav.selectedNavTab !== NavTab.Chats) {
|
if (nav.selectedNavTab !== NavTab.Chats) {
|
||||||
dispatch(navActions.changeNavTab(NavTab.Chats));
|
dispatch(navActions.changeNavTab(NavTab.Chats));
|
||||||
|
const conversation = window.ConversationController.get(conversationId);
|
||||||
|
conversation?.setMarkedUnread(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (conversationId === conversations.selectedConversationId) {
|
if (conversationId === conversations.selectedConversationId) {
|
||||||
|
|
|
@ -79,16 +79,16 @@ export function SmartChatsTab(): JSX.Element {
|
||||||
scrollToMessage(selectedConversationId, targetedMessage);
|
scrollToMessage(selectedConversationId, targetedMessage);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!selectedConversationId) {
|
if (
|
||||||
return;
|
selectedConversationId != null &&
|
||||||
|
selectedConversationId !== prevConversationId
|
||||||
|
) {
|
||||||
|
const conversation = window.ConversationController.get(
|
||||||
|
selectedConversationId
|
||||||
|
);
|
||||||
|
strictAssert(conversation, 'Conversation must be found');
|
||||||
|
conversation.setMarkedUnread(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
const conversation = window.ConversationController.get(
|
|
||||||
selectedConversationId
|
|
||||||
);
|
|
||||||
strictAssert(conversation, 'Conversation must be found');
|
|
||||||
|
|
||||||
conversation.setMarkedUnread(false);
|
|
||||||
}, [
|
}, [
|
||||||
onConversationClosed,
|
onConversationClosed,
|
||||||
onConversationOpened,
|
onConversationOpened,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue