summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/components/notifications.vue7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/client/components/notifications.vue b/src/client/components/notifications.vue
index fa1e2fad71..dff4bd35da 100644
--- a/src/client/components/notifications.vue
+++ b/src/client/components/notifications.vue
@@ -75,11 +75,12 @@ export default Vue.extend({
this.$root.stream.send('readNotification', {
id: notification.id
});
-
- notification.isRead = true;
}
- this.prepend(notification);
+ this.prepend({
+ ...notification,
+ isRead: document.visibilityState === 'visible'
+ });
},
}
});