Merge pull request #20684 from Scroody/i-19354

Fix: Emoji animations are not being turned off by using the slider in settings.
This commit is contained in:
Ramón Souza 2024-07-11 09:37:20 -03:00 committed by GitHub
commit a46e38fbbe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -93,7 +93,7 @@ const EmojiRain = ({ reactions }) => {
}, [EMOJI_RAIN_ENABLED, animations, isAnimating]); }, [EMOJI_RAIN_ENABLED, animations, isAnimating]);
useEffect(() => { useEffect(() => {
if (isAnimating) { if (isAnimating && animations !== false) {
reactions.forEach((reaction) => { reactions.forEach((reaction) => {
const currentTime = new Date().getTime(); const currentTime = new Date().getTime();
const secondsSinceCreated = (currentTime - reaction.creationDate.getTime()) / 1000; const secondsSinceCreated = (currentTime - reaction.creationDate.getTime()) / 1000;