mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-11 19:20:55 +01:00
Fix #2858
This commit is contained in:
parent
7cf72f7447
commit
32371ed2bd
3 changed files with 15 additions and 9 deletions
|
@ -26,12 +26,14 @@ export default Vue.extend({
|
||||||
this.init();
|
this.init();
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
this.connection.close();
|
this.connection.dispose();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
init() {
|
init() {
|
||||||
if (this.connection) this.connection.close();
|
if (this.connection) this.connection.dispose();
|
||||||
this.connection = new UserListStream((this as any).os, this.$store.state.i, this.list.id);
|
this.connection = (this as any).os.stream.connectToChannel('userList', {
|
||||||
|
listId: this.list.id
|
||||||
|
});
|
||||||
this.connection.on('note', this.onNote);
|
this.connection.on('note', this.onNote);
|
||||||
this.connection.on('userAdded', this.onUserAdded);
|
this.connection.on('userAdded', this.onUserAdded);
|
||||||
this.connection.on('userRemoved', this.onUserRemoved);
|
this.connection.on('userRemoved', this.onUserRemoved);
|
||||||
|
|
|
@ -46,8 +46,10 @@ export default Vue.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
if (this.connection) this.connection.close();
|
if (this.connection) this.connection.dispose();
|
||||||
this.connection = new UserListStream((this as any).os, this.$store.state.i, this.list.id);
|
this.connection = (this as any).os.stream.connectToChannel('userList', {
|
||||||
|
listId: this.list.id
|
||||||
|
});
|
||||||
this.connection.on('note', this.onNote);
|
this.connection.on('note', this.onNote);
|
||||||
this.connection.on('userAdded', this.onUserAdded);
|
this.connection.on('userAdded', this.onUserAdded);
|
||||||
this.connection.on('userRemoved', this.onUserRemoved);
|
this.connection.on('userRemoved', this.onUserRemoved);
|
||||||
|
@ -56,7 +58,7 @@ export default Vue.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
this.connection.close();
|
this.connection.dispose();
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -36,13 +36,15 @@ export default Vue.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
this.connection.close();
|
this.connection.dispose();
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
init() {
|
init() {
|
||||||
if (this.connection) this.connection.close();
|
if (this.connection) this.connection.dispose();
|
||||||
this.connection = new UserListStream((this as any).os, this.$store.state.i, this.list.id);
|
this.connection = (this as any).os.stream.connectToChannel('userList', {
|
||||||
|
listId: this.list.id
|
||||||
|
});
|
||||||
this.connection.on('note', this.onNote);
|
this.connection.on('note', this.onNote);
|
||||||
this.connection.on('userAdded', this.onUserAdded);
|
this.connection.on('userAdded', this.onUserAdded);
|
||||||
this.connection.on('userRemoved', this.onUserRemoved);
|
this.connection.on('userRemoved', this.onUserRemoved);
|
||||||
|
|
Loading…
Reference in a new issue