fix(emoji-rain): increase date comparison trigger
The date comparison check was too strict/wrong, increase it to show the emojis created in the last second to account for delays in connection.
This commit is contained in:
parent
b2f25decd6
commit
cb075137b3
@ -87,7 +87,10 @@ const EmojiRain = ({ reactions }) => {
|
||||
useEffect(() => {
|
||||
if (isAnimating) {
|
||||
reactions.forEach((reaction) => {
|
||||
if (Date() == reaction.creationDate && (reaction.reaction !== 'none')) {
|
||||
//if (Date() == reaction.creationDate && (reaction.reaction !== 'none')) {
|
||||
const currentTime = new Date().getTime();
|
||||
const secondsSinceCreated = (currentTime - reaction.creationDate.getTime()) / 1000;
|
||||
if (secondsSinceCreated <= 1 && (reaction.reaction !== 'none')) {
|
||||
createEmojiRain(reaction.reaction);
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user