Fix double fadein for post stream (#2300)

This commit is contained in:
Alexander Skvortsov 2020-09-23 23:04:56 -04:00 committed by GitHub
parent f4449e962d
commit 6e9db779cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -368,6 +368,10 @@ export default class PostStream extends Component {
* @param {jQuery} $item
*/
flashItem($item) {
$item.addClass('flash').one('animationend webkitAnimationEnd', () => $item.removeClass('flash'));
$item.addClass('flash').on('animationend webkitAnimationEnd', (e) => {
if (e.animationName === 'fadeIn') {
$item.removeClass('flash');
}
});
}
}