diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2021-03-21 15:35:02 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2021-03-21 15:35:02 +0900 |
| commit | 630464f38d2524ddc5d11d2abd4fddcccc4240d4 (patch) | |
| tree | 54d61708d279205f1da4fb81cfd42959f0bbcaf5 /src/client/components | |
| parent | perf: 各ストリーミング接続ごとにポーリングしないように (diff) | |
| download | sharkey-630464f38d2524ddc5d11d2abd4fddcccc4240d4.tar.gz sharkey-630464f38d2524ddc5d11d2abd4fddcccc4240d4.tar.bz2 sharkey-630464f38d2524ddc5d11d2abd4fddcccc4240d4.zip | |
Revert "perf: Reduce database query"
This reverts commit 87c8f9ff953499340496e9c5db09c93eaff08851.
Diffstat (limited to 'src/client/components')
| -rw-r--r-- | src/client/components/note-detailed.vue | 10 | ||||
| -rw-r--r-- | src/client/components/note.vue | 10 |
2 files changed, 2 insertions, 18 deletions
diff --git a/src/client/components/note-detailed.vue b/src/client/components/note-detailed.vue index 4ad3d2d898..1ef3f43389 100644 --- a/src/client/components/note-detailed.vue +++ b/src/client/components/note-detailed.vue @@ -350,15 +350,7 @@ export default defineComponent({ capture(withHandler = false) { if (this.$i) { - this.connection.send('sn', { id: this.appearNote.id }); - if (this.appearNote.userId !== this.$i.id) { - if (this.appearNote.mentions && this.appearNote.mentions.includes(this.$i.id)) { - this.connection.send('readMention', { id: this.appearNote.id }); - } - if (this.appearNote.visibleUserIds && this.appearNote.visibleUserIds.includes(this.$i.id)) { - this.connection.send('readSpecifiedNote', { id: this.appearNote.id }); - } - } + this.connection.send(document.body.contains(this.$el) ? 'sn' : 's', { id: this.appearNote.id }); if (withHandler) this.connection.on('noteUpdated', this.onStreamNoteUpdated); } }, diff --git a/src/client/components/note.vue b/src/client/components/note.vue index 3b59afd71d..65e09b7802 100644 --- a/src/client/components/note.vue +++ b/src/client/components/note.vue @@ -325,15 +325,7 @@ export default defineComponent({ capture(withHandler = false) { if (this.$i) { - this.connection.send('sn', { id: this.appearNote.id }); - if (this.appearNote.userId !== this.$i.id) { - if (this.appearNote.mentions && this.appearNote.mentions.includes(this.$i.id)) { - this.connection.send('readMention', { id: this.appearNote.id }); - } - if (this.appearNote.visibleUserIds && this.appearNote.visibleUserIds.includes(this.$i.id)) { - this.connection.send('readSpecifiedNote', { id: this.appearNote.id }); - } - } + this.connection.send(document.body.contains(this.$el) ? 'sn' : 's', { id: this.appearNote.id }); if (withHandler) this.connection.on('noteUpdated', this.onStreamNoteUpdated); } }, |