Message: Fix appearance order (#6835)

This commit is contained in:
zubiden 2026-04-14 14:36:15 +02:00 committed by Alexander Zinchuk
parent 43b6ddd426
commit ac07a2242b
3 changed files with 6 additions and 9 deletions

View File

@ -309,10 +309,8 @@ const ActionMessage = ({
return;
}
const timeout = setTimeout(markShown, appearanceOrder * MESSAGE_APPEARANCE_DELAY);
return () => {
clearTimeout(timeout);
};
// Keep as is for now to avoid breaking appearance order
setTimeout(markShown, appearanceOrder * MESSAGE_APPEARANCE_DELAY);
}, [appearanceOrder, noAppearanceAnimation]);
const { ref: refWithTransition } = useShowTransition({

View File

@ -530,10 +530,8 @@ const Message = ({
return;
}
const timeout = setTimeout(markShown, appearanceOrder * MESSAGE_APPEARANCE_DELAY);
return () => {
clearTimeout(timeout);
};
// Keep as is for now to avoid breaking appearance order
setTimeout(markShown, appearanceOrder * MESSAGE_APPEARANCE_DELAY);
}, [appearanceOrder, noAppearanceAnimation]);
useShowTransition({

View File

@ -92,8 +92,9 @@ const SenderGroupContainer: FC<OwnProps & StateProps> = ({
return;
}
// Keep as is for now to avoid breaking appearance order
setTimeout(markShown, appearanceOrder * MESSAGE_APPEARANCE_DELAY);
}, [appearanceOrder, markShown, noAppearanceAnimation]);
}, [appearanceOrder, noAppearanceAnimation]);
const shouldPreferOriginSender = forwardInfo
&& (isChatWithSelf || isRepliesChat || isAnonymousForwards || !messageSender);