Main: Prevent refreshing layout during phone call (#1991)

This commit is contained in:
Alexander Zinchuk 2022-08-09 13:21:28 +02:00
parent 8e177b1eca
commit b4120c0483

View File

@ -258,7 +258,7 @@ const Main: FC<StateProps> = ({
// Prevent refresh by accidentally rotating device when listening to a voice chat
useEffect(() => {
if (!activeGroupCallId) {
if (!activeGroupCallId && !isPhoneCallActive) {
return undefined;
}
@ -267,7 +267,7 @@ const Main: FC<StateProps> = ({
return () => {
windowSize.enableRefresh();
};
}, [activeGroupCallId]);
}, [activeGroupCallId, isPhoneCallActive]);
const leftColumnTransition = useShowTransition(
isLeftColumnOpen, undefined, true, undefined, shouldSkipHistoryAnimations,