summaryrefslogtreecommitdiff
path: root/src/client/components/note.vue
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2021-03-21 15:35:02 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2021-03-21 15:35:02 +0900
commit630464f38d2524ddc5d11d2abd4fddcccc4240d4 (patch)
tree54d61708d279205f1da4fb81cfd42959f0bbcaf5 /src/client/components/note.vue
parentperf: 各ストリーミング接続ごとにポーリングしないように (diff)
downloadsharkey-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/note.vue')
-rw-r--r--src/client/components/note.vue10
1 files changed, 1 insertions, 9 deletions
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);
}
},