This commit is contained in:
syuilo
2020-02-09 03:49:18 +09:00
parent 851dececab
commit 390279a4a8
2 changed files with 7 additions and 12 deletions

View File

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