mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-10 02:03:08 +02:00
This commit is contained in:
parent
baa49271df
commit
05c7cacdd1
1 changed files with 5 additions and 4 deletions
|
@ -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);
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue