This commit is contained in:
parent
baa49271df
commit
05c7cacdd1
@ -71,10 +71,11 @@ export default Vue.extend({
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
onNotification(notification) {
|
onNotification(notification) {
|
||||||
// TODO: ユーザーが画面を見てないと思われるとき(ブラウザやタブがアクティブじゃないなど)は送信しない
|
if (document.visibilityState === 'visible') {
|
||||||
this.$root.stream.send('readNotification', {
|
this.$root.stream.send('readNotification', {
|
||||||
id: notification.id
|
id: notification.id
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
this.prepend(notification);
|
this.prepend(notification);
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user