[Perf] Chat List: Speed up opening

This commit is contained in:
Alexander Zinchuk 2022-09-13 09:48:11 +02:00
parent ed7b0b579b
commit 2a6debb587
2 changed files with 2 additions and 2 deletions

View File

@ -189,7 +189,7 @@ const Chat: FC<OwnProps & StateProps> = ({
}, [animationLevel, orderDiff, animationType]);
const handleClick = useCallback(() => {
openChat({ id: chatId, shouldReplaceHistory: true });
openChat({ id: chatId, shouldReplaceHistory: true }, { forceOnHeavyAnimation: true });
if (isSelected && canScrollDown) {
focusLastMessage();

View File

@ -208,7 +208,7 @@ const MiddleHeader: FC<OwnProps & StateProps> = ({
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
openChat({ id: undefined });
openChat({ id: undefined }, { forceOnHeavyAnimation: true });
} else {
toggleLeftColumn();
}