diff --git a/src/components/NotificationRow.tsx b/src/components/NotificationRow.tsx index 54bac2ab7..c69f29d79 100644 --- a/src/components/NotificationRow.tsx +++ b/src/components/NotificationRow.tsx @@ -124,34 +124,36 @@ export const NotificationRow: FC = ({ - - { - setAnimateExit(!settings.delayNotificationState); - setShowAsRead(settings.delayNotificationState); - markNotificationDone(notification); - }} - /> - { - setAnimateExit(!settings.delayNotificationState); - setShowAsRead(settings.delayNotificationState); - markNotificationRead(notification); - }} - /> - - + {!animateExit && ( + + { + setAnimateExit(!settings.delayNotificationState); + setShowAsRead(settings.delayNotificationState); + markNotificationDone(notification); + }} + /> + { + setAnimateExit(!settings.delayNotificationState); + setShowAsRead(settings.delayNotificationState); + markNotificationRead(notification); + }} + /> + + + )} ); }; diff --git a/src/components/RepositoryNotifications.tsx b/src/components/RepositoryNotifications.tsx index 65a229397..27b50ad49 100644 --- a/src/components/RepositoryNotifications.tsx +++ b/src/components/RepositoryNotifications.tsx @@ -78,38 +78,40 @@ export const RepositoryNotifications: FC = ({ - - ) => { - // Don't trigger onClick of parent element. - event.stopPropagation(); - setAnimateExit(!settings.delayNotificationState); - setShowAsRead(settings.delayNotificationState); - markRepoNotificationsDone(repoNotifications[0]); - }} - /> - ) => { - // Don't trigger onClick of parent element. - event.stopPropagation(); - setAnimateExit(!settings.delayNotificationState); - setShowAsRead(settings.delayNotificationState); - markRepoNotificationsRead(repoNotifications[0]); - }} - /> - - + {!animateExit && ( + + ) => { + // Don't trigger onClick of parent element. + event.stopPropagation(); + setAnimateExit(!settings.delayNotificationState); + setShowAsRead(settings.delayNotificationState); + markRepoNotificationsDone(repoNotifications[0]); + }} + /> + ) => { + // Don't trigger onClick of parent element. + event.stopPropagation(); + setAnimateExit(!settings.delayNotificationState); + setShowAsRead(settings.delayNotificationState); + markRepoNotificationsRead(repoNotifications[0]); + }} + /> + + + )} {showRepositoryNotifications &&