Middle Header: Exit select mode with Back button (#1409)

This commit is contained in:
Alexander Zinchuk 2021-08-20 23:47:22 +03:00
parent a9f990c7c9
commit 0079e21906

View File

@ -188,6 +188,11 @@ const MiddleHeader: FC<OwnProps & StateProps & DispatchProps> = ({
}
}
if (isSelectModeActive) {
exitMessageSelectMode();
return;
}
if (threadId === MAIN_THREAD_ID && messageListType === 'thread' && currentTransitionKey === 0) {
if (IS_SINGLE_COLUMN_LAYOUT || shouldShowCloseButton) {
e.stopPropagation(); // Stop propagation to prevent chat re-opening on tablets
@ -199,10 +204,6 @@ const MiddleHeader: FC<OwnProps & StateProps & DispatchProps> = ({
return;
}
if (messageListType === 'scheduled' && isSelectModeActive) {
exitMessageSelectMode();
}
openPreviousChat();
}, [
threadId, messageListType, currentTransitionKey, isSelectModeActive, openPreviousChat, shouldShowCloseButton,