Middle Column: Use blocking animation for Message List transition
This commit is contained in:
parent
8e5236d102
commit
9fa6077fc7
@ -544,6 +544,7 @@ function MiddleColumn({
|
||||
activeKey={currentTransitionKey}
|
||||
shouldCleanup
|
||||
cleanupExceptionKey={cleanupExceptionKey}
|
||||
isBlockingAnimation
|
||||
onStop={handleSlideTransitionStop}
|
||||
>
|
||||
<MessageList
|
||||
|
||||
@ -44,6 +44,7 @@ export type TransitionProps = {
|
||||
className?: string;
|
||||
slideClassName?: string;
|
||||
withSwipeControl?: boolean;
|
||||
isBlockingAnimation?: boolean;
|
||||
onStart?: NoneToVoidFunction;
|
||||
onStop?: NoneToVoidFunction;
|
||||
children: React.ReactNode | ChildrenFn;
|
||||
@ -83,6 +84,7 @@ function Transition({
|
||||
className,
|
||||
slideClassName,
|
||||
withSwipeControl,
|
||||
isBlockingAnimation,
|
||||
onStart,
|
||||
onStop,
|
||||
children,
|
||||
@ -200,6 +202,7 @@ function Transition({
|
||||
childNodes[activeIndex],
|
||||
childNodes[prevActiveIndex],
|
||||
shouldRestoreHeight,
|
||||
isBlockingAnimation,
|
||||
onStart,
|
||||
onStop,
|
||||
);
|
||||
@ -236,7 +239,7 @@ function Transition({
|
||||
});
|
||||
|
||||
isAnimatingRef.current = true;
|
||||
const endHeavyAnimation = beginHeavyAnimation();
|
||||
const endHeavyAnimation = beginHeavyAnimation(undefined, isBlockingAnimation);
|
||||
onStart?.();
|
||||
|
||||
toggleExtraClass(container, `Transition-${name}`, !isBackwards);
|
||||
@ -321,6 +324,7 @@ function Transition({
|
||||
shouldDisableAnimation,
|
||||
forceUpdate,
|
||||
withSwipeControl,
|
||||
isBlockingAnimation,
|
||||
cleanupOnlyKey,
|
||||
]);
|
||||
|
||||
@ -394,6 +398,7 @@ function performSlideOptimized(
|
||||
toSlide: ChildNode,
|
||||
fromSlide?: ChildNode,
|
||||
shouldRestoreHeight?: boolean,
|
||||
isBlockingAnimation?: boolean,
|
||||
onStart?: NoneToVoidFunction,
|
||||
onStop?: NoneToVoidFunction,
|
||||
) {
|
||||
@ -427,7 +432,7 @@ function performSlideOptimized(
|
||||
}
|
||||
|
||||
isAnimatingRef.current = true;
|
||||
const endHeavyAnimation = beginHeavyAnimation();
|
||||
const endHeavyAnimation = beginHeavyAnimation(undefined, isBlockingAnimation);
|
||||
onStart?.();
|
||||
|
||||
toggleExtraClass(container, `Transition-${name}`, !isBackwards);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user