自分宛ての投稿をタイムラインで見れるように
This commit is contained in:
@ -47,6 +47,7 @@ export default Vue.extend({
|
||||
case 'local': return (this as any).os.streams.localTimelineStream;
|
||||
case 'hybrid': return (this as any).os.streams.hybridTimelineStream;
|
||||
case 'global': return (this as any).os.streams.globalTimelineStream;
|
||||
case 'mentions': return (this as any).os.stream;
|
||||
}
|
||||
},
|
||||
|
||||
@ -56,6 +57,7 @@ export default Vue.extend({
|
||||
case 'local': return 'notes/local-timeline';
|
||||
case 'hybrid': return 'notes/hybrid-timeline';
|
||||
case 'global': return 'notes/global-timeline';
|
||||
case 'mentions': return 'notes/mentions';
|
||||
}
|
||||
},
|
||||
|
||||
@ -68,7 +70,7 @@ export default Vue.extend({
|
||||
this.connection = this.stream.getConnection();
|
||||
this.connectionId = this.stream.use();
|
||||
|
||||
this.connection.on('note', this.onNote);
|
||||
this.connection.on(this.src == 'mentions' ? 'mention' : 'note', this.onNote);
|
||||
if (this.src == 'home') {
|
||||
this.connection.on('follow', this.onChangeFollowing);
|
||||
this.connection.on('unfollow', this.onChangeFollowing);
|
||||
@ -78,7 +80,7 @@ export default Vue.extend({
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
this.connection.off('note', this.onNote);
|
||||
this.connection.off(this.src == 'mentions' ? 'mention' : 'note', this.onNote);
|
||||
if (this.src == 'home') {
|
||||
this.connection.off('follow', this.onChangeFollowing);
|
||||
this.connection.off('unfollow', this.onChangeFollowing);
|
||||
|
Reference in New Issue
Block a user