1
0
This commit is contained in:
tamaina
2021-12-29 17:40:39 +09:00
parent 6836c8e98e
commit 39b377c06f
29 changed files with 94 additions and 65 deletions
@@ -17,6 +17,7 @@
import { computed, defineComponent, markRaw } from 'vue';
import XNotes from '../notes.vue';
import * as os from '@/os';
import { stream } from '@/stream';
import * as sound from '@/scripts/sound';
import { scrollToBottom, getScrollPosition, getScrollContainer } from '@/scripts/scroll';
import follow from '@/directives/follow-append';
@@ -90,23 +91,23 @@ export default defineComponent({
if (this.src == 'home') {
endpoint = 'notes/timeline';
this.connection = markRaw(os.stream.useChannel('homeTimeline'));
this.connection = markRaw(stream.useChannel('homeTimeline'));
this.connection.on('note', prepend);
this.connection2 = markRaw(os.stream.useChannel('main'));
this.connection2 = markRaw(stream.useChannel('main'));
this.connection2.on('follow', onChangeFollowing);
this.connection2.on('unfollow', onChangeFollowing);
} else if (this.src == 'local') {
endpoint = 'notes/local-timeline';
this.connection = markRaw(os.stream.useChannel('localTimeline'));
this.connection = markRaw(stream.useChannel('localTimeline'));
this.connection.on('note', prepend);
} else if (this.src == 'social') {
endpoint = 'notes/hybrid-timeline';
this.connection = markRaw(os.stream.useChannel('hybridTimeline'));
this.connection = markRaw(stream.useChannel('hybridTimeline'));
this.connection.on('note', prepend);
} else if (this.src == 'global') {
endpoint = 'notes/global-timeline';
this.connection = markRaw(os.stream.useChannel('globalTimeline'));
this.connection = markRaw(stream.useChannel('globalTimeline'));
this.connection.on('note', prepend);
}