From bc52d1a5e225c698ae2dcdbdfcc6329d2ef46f2a Mon Sep 17 00:00:00 2001 From: Alexander Zinchuk Date: Sun, 18 Jun 2023 12:03:49 +0200 Subject: [PATCH] ChatList: Highlight selected forum after closing topic panel (#3339) --- src/components/left/main/Chat.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/left/main/Chat.tsx b/src/components/left/main/Chat.tsx index 6b5a98fbc..dac029832 100644 --- a/src/components/left/main/Chat.tsx +++ b/src/components/left/main/Chat.tsx @@ -342,7 +342,8 @@ export default memo(withGlobal( type: messageListType, } = selectCurrentMessageList(global) || {}; const isSelected = chatId === currentChatId && currentThreadId === MAIN_THREAD_ID; - const isSelectedForum = chatId === selectTabState(global).forumPanelChatId; + const isSelectedForum = (chat.isForum && chatId === currentChatId) + || chatId === selectTabState(global).forumPanelChatId; const user = privateChatUserId ? selectUser(global, privateChatUserId) : undefined; const userStatus = privateChatUserId ? selectUserStatus(global, privateChatUserId) : undefined;