summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortamaina <tamaina@hotmail.co.jp>2020-05-24 18:41:40 +0900
committertamaina <tamaina@hotmail.co.jp>2020-05-24 18:41:40 +0900
commit05c7cacdd1ddc3684f0375686d99b5e4043908cd (patch)
tree92112183205e63ae54a577820d803c518fd5e133 /src
parent12.38.1 (diff)
downloadsharkey-05c7cacdd1ddc3684f0375686d99b5e4043908cd.tar.gz
sharkey-05c7cacdd1ddc3684f0375686d99b5e4043908cd.tar.bz2
sharkey-05c7cacdd1ddc3684f0375686d99b5e4043908cd.zip
Resolve https://github.com/syuilo/misskey/pull/6406#issuecomment-633203670
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);
},