summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/components/notifications.vue9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/client/components/notifications.vue b/src/client/components/notifications.vue
index 3ed198a04c..434a87eb41 100644
--- a/src/client/components/notifications.vue
+++ b/src/client/components/notifications.vue
@@ -71,10 +71,11 @@ export default Vue.extend({
methods: {
onNotification(notification) {
- // TODO: ユーザーが画面を見てないと思われるとき(ブラウザやタブがアクティブじゃないなど)は送信しない
- this.$root.stream.send('readNotification', {
- id: notification.id
- });
+ if (document.visibilityState === 'visible') {
+ this.$root.stream.send('readNotification', {
+ id: notification.id
+ });
+ }
this.prepend(notification);
},