Forum: Do not open a list of messages when clicking on the forum (#2428)
This commit is contained in:
parent
81bcd32f81
commit
6e5211d742
@ -125,6 +125,7 @@ const Chat: FC<OwnProps & StateProps> = ({
|
||||
openChat,
|
||||
focusLastMessage,
|
||||
loadTopics,
|
||||
openForumPanel,
|
||||
} = getActions();
|
||||
|
||||
const { isMobile } = useAppLayout();
|
||||
@ -155,12 +156,17 @@ const Chat: FC<OwnProps & StateProps> = ({
|
||||
});
|
||||
|
||||
const handleClick = useCallback(() => {
|
||||
if (isForum) {
|
||||
openForumPanel({ chatId });
|
||||
return;
|
||||
}
|
||||
|
||||
openChat({ id: chatId, shouldReplaceHistory: true }, { forceOnHeavyAnimation: true });
|
||||
|
||||
if (isSelected && canScrollDown) {
|
||||
focusLastMessage();
|
||||
}
|
||||
}, [openChat, chatId, isSelected, canScrollDown, focusLastMessage]);
|
||||
}, [isForum, openChat, chatId, isSelected, canScrollDown, openForumPanel, focusLastMessage]);
|
||||
|
||||
const handleDragEnter = useCallback((e) => {
|
||||
e.preventDefault();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user