[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]);
|
}, [animationLevel, orderDiff, animationType]);
|
||||||
|
|
||||||
const handleClick = useCallback(() => {
|
const handleClick = useCallback(() => {
|
||||||
openChat({ id: chatId, shouldReplaceHistory: true });
|
openChat({ id: chatId, shouldReplaceHistory: true }, { forceOnHeavyAnimation: true });
|
||||||
|
|
||||||
if (isSelected && canScrollDown) {
|
if (isSelected && canScrollDown) {
|
||||||
focusLastMessage();
|
focusLastMessage();
|
||||||
|
|||||||
@ -208,7 +208,7 @@ const MiddleHeader: FC<OwnProps & StateProps> = ({
|
|||||||
if (threadId === MAIN_THREAD_ID && messageListType === 'thread' && currentTransitionKey === 0) {
|
if (threadId === MAIN_THREAD_ID && messageListType === 'thread' && currentTransitionKey === 0) {
|
||||||
if (IS_SINGLE_COLUMN_LAYOUT || shouldShowCloseButton) {
|
if (IS_SINGLE_COLUMN_LAYOUT || shouldShowCloseButton) {
|
||||||
e.stopPropagation(); // Stop propagation to prevent chat re-opening on tablets
|
e.stopPropagation(); // Stop propagation to prevent chat re-opening on tablets
|
||||||
openChat({ id: undefined });
|
openChat({ id: undefined }, { forceOnHeavyAnimation: true });
|
||||||
} else {
|
} else {
|
||||||
toggleLeftColumn();
|
toggleLeftColumn();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user