diff options
| author | tamaina <tamaina@hotmail.co.jp> | 2020-05-24 18:41:40 +0900 |
|---|---|---|
| committer | tamaina <tamaina@hotmail.co.jp> | 2020-05-24 18:41:40 +0900 |
| commit | 05c7cacdd1ddc3684f0375686d99b5e4043908cd (patch) | |
| tree | 92112183205e63ae54a577820d803c518fd5e133 /src | |
| parent | 12.38.1 (diff) | |
| download | sharkey-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.vue | 9 |
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); }, |