[Perf] Chat List: Speed up opening
This commit is contained in:
parent
ed7b0b579b
commit
2a6debb587
@ -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();
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user