Refactor & Clean up

This commit is contained in:
syuilo 2018-11-09 08:13:34 +09:00
parent ba845f5218
commit 60ef3e3563
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69
154 changed files with 438 additions and 481 deletions

View file

@ -26,7 +26,7 @@ export default Vue.extend({
},
mounted() {
this.connection = (this as any).os.stream.useSharedConnection('main');
this.connection = this.$root.stream.useSharedConnection('main');
this.connection.on('mention', this.onNote);
this.fetch();
@ -41,7 +41,7 @@ export default Vue.extend({
this.fetching = true;
(this.$refs.timeline as any).init(() => new Promise((res, rej) => {
(this as any).api('notes/mentions', {
this.$root.api('notes/mentions', {
limit: fetchLimit + 1,
includeMyRenotes: this.$store.state.settings.showMyRenotes,
includeRenotedMyNotes: this.$store.state.settings.showRenotedMyNotes,
@ -62,7 +62,7 @@ export default Vue.extend({
more() {
this.moreFetching = true;
const promise = (this as any).api('notes/mentions', {
const promise = this.$root.api('notes/mentions', {
limit: fetchLimit + 1,
untilId: (this.$refs.timeline as any).tail().id,
includeMyRenotes: this.$store.state.settings.showMyRenotes,