Comments: Fix back button stuck on reload (#2746)

This commit is contained in:
Alexander Zinchuk 2023-03-03 16:35:22 +01:00
parent 17ff3b47a7
commit ddc058899e

View File

@ -235,7 +235,7 @@ const MiddleHeader: FC<OwnProps & StateProps> = ({
}
if (messageListType === 'thread' && currentTransitionKey === 0) {
if (isMobile || shouldShowCloseButton) {
if (!isTablet || shouldShowCloseButton) {
e.stopPropagation(); // Stop propagation to prevent chat re-opening on tablets
openChat({ id: undefined }, { forceOnHeavyAnimation: true });
} else {
@ -250,8 +250,8 @@ const MiddleHeader: FC<OwnProps & StateProps> = ({
openPreviousChat();
setBackButtonActive();
}, [
messageListType, currentTransitionKey, isSelectModeActive, openPreviousChat, shouldShowCloseButton,
openChat, toggleLeftColumn, exitMessageSelectMode, setBackButtonActive, isMobile,
isMobile, isSelectModeActive, messageListType, currentTransitionKey, setBackButtonActive, isTablet,
shouldShowCloseButton,
]);
const canToolsCollideWithChatInfo = (