Middle Header: Some buttons are inactive in a new application window if the right column is open (#3382)

This commit is contained in:
Alexander Zinchuk 2023-06-20 20:55:10 +02:00
parent dc0999702c
commit e1eb7a0315

View File

@ -454,12 +454,12 @@ const Main: FC<OwnProps & StateProps> = ({
const isFullscreen = useFullscreenStatus();
// Handle opening right column
useSyncEffect(([prevIsRightColumnOpen]) => {
useSyncEffect(([prevIsMiddleColumnOpen, prevIsRightColumnOpen]) => {
if (prevIsRightColumnOpen === undefined || isRightColumnOpen === prevIsRightColumnOpen) {
return;
}
if (noRightColumnAnimation) {
if (!prevIsMiddleColumnOpen || noRightColumnAnimation) {
setIsNarrowMessageList(isRightColumnOpen);
return;
}
@ -474,7 +474,7 @@ const Main: FC<OwnProps & StateProps> = ({
forceUpdate();
setIsNarrowMessageList(isRightColumnOpen);
});
}, [isRightColumnOpen, noRightColumnAnimation, forceUpdate]);
}, [isMiddleColumnOpen, isRightColumnOpen, noRightColumnAnimation, forceUpdate]);
const className = buildClassName(
leftColumnTransition.hasShownClass && 'left-column-shown',