This commit is contained in:
syuilo 2020-02-06 22:18:23 +09:00
parent 47f3261b9f
commit ff7ae427fd

View file

@ -275,8 +275,14 @@ export default Vue.extend({
methods: { methods: {
capture(withHandler = false) { capture(withHandler = false) {
if (this.$store.getters.isSignedIn) { if (this.$store.getters.isSignedIn) {
this.connection.send('sn', { id: this.appearNote.id }); if (document.body.contains(this.$el)) {
if (withHandler) this.connection.on('noteUpdated', this.onStreamNoteUpdated); this.connection.send('sn', { id: this.appearNote.id });
if (withHandler) this.connection.on('noteUpdated', this.onStreamNoteUpdated);
} else {
this.$once('hook:activated', () => {
this.capture(withHandler);
});
}
} }
}, },