ストリーミングが不安定な問題を修正
This commit is contained in:
@ -46,7 +46,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import { defineComponent, markRaw } from 'vue';
|
||||
import XNavFolder from './drive.nav-folder.vue';
|
||||
import XFolder from './drive.folder.vue';
|
||||
import XFile from './drive.file.vue';
|
||||
@ -139,7 +139,7 @@ export default defineComponent({
|
||||
});
|
||||
}
|
||||
|
||||
this.connection = os.stream.useChannel('drive');
|
||||
this.connection = markRaw(os.stream.useChannel('drive'));
|
||||
|
||||
this.connection.on('fileCreated', this.onStreamDriveFileCreated);
|
||||
this.connection.on('fileUpdated', this.onStreamDriveFileUpdated);
|
||||
|
@ -28,7 +28,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import { defineComponent, markRaw } from 'vue';
|
||||
import * as os from '@client/os';
|
||||
|
||||
export default defineComponent({
|
||||
@ -71,7 +71,7 @@ export default defineComponent({
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.connection = os.stream.useChannel('main');
|
||||
this.connection = markRaw(os.stream.useChannel('main'));
|
||||
|
||||
this.connection.on('follow', this.onFollowChange);
|
||||
this.connection.on('unfollow', this.onFollowChange);
|
||||
|
@ -58,7 +58,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import { defineComponent, markRaw } from 'vue';
|
||||
import { getNoteSummary } from '@/misc/get-note-summary';
|
||||
import XReactionIcon from './reaction-icon.vue';
|
||||
import MkFollowButton from './follow-button.vue';
|
||||
@ -109,7 +109,7 @@ export default defineComponent({
|
||||
|
||||
this.readObserver.observe(this.$el);
|
||||
|
||||
this.connection = os.stream.useChannel('main');
|
||||
this.connection = markRaw(os.stream.useChannel('main'));
|
||||
this.connection.on('readAllNotifications', () => this.readObserver.unobserve(this.$el));
|
||||
}
|
||||
},
|
||||
|
@ -21,7 +21,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, PropType } from 'vue';
|
||||
import { defineComponent, PropType, markRaw } from 'vue';
|
||||
import paging from '@client/scripts/paging';
|
||||
import XNotification from './notification.vue';
|
||||
import XList from './date-separated-list.vue';
|
||||
@ -89,7 +89,7 @@ export default defineComponent({
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.connection = os.stream.useChannel('main');
|
||||
this.connection = markRaw(os.stream.useChannel('main'));
|
||||
this.connection.on('notification', this.onNotification);
|
||||
},
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import { defineComponent, markRaw } from 'vue';
|
||||
import XNotes from './notes.vue';
|
||||
import * as os from '@client/os';
|
||||
import * as sound from '@client/scripts/sound';
|
||||
@ -92,33 +92,33 @@ export default defineComponent({
|
||||
this.query = {
|
||||
antennaId: this.antenna
|
||||
};
|
||||
this.connection = os.stream.useChannel('antenna', {
|
||||
this.connection = markRaw(os.stream.useChannel('antenna', {
|
||||
antennaId: this.antenna
|
||||
});
|
||||
}));
|
||||
this.connection.on('note', prepend);
|
||||
} else if (this.src == 'home') {
|
||||
endpoint = 'notes/timeline';
|
||||
this.connection = os.stream.useChannel('homeTimeline');
|
||||
this.connection = markRaw(os.stream.useChannel('homeTimeline'));
|
||||
this.connection.on('note', prepend);
|
||||
|
||||
this.connection2 = os.stream.useChannel('main');
|
||||
this.connection2 = markRaw(os.stream.useChannel('main'));
|
||||
this.connection2.on('follow', onChangeFollowing);
|
||||
this.connection2.on('unfollow', onChangeFollowing);
|
||||
} else if (this.src == 'local') {
|
||||
endpoint = 'notes/local-timeline';
|
||||
this.connection = os.stream.useChannel('localTimeline');
|
||||
this.connection = markRaw(os.stream.useChannel('localTimeline'));
|
||||
this.connection.on('note', prepend);
|
||||
} else if (this.src == 'social') {
|
||||
endpoint = 'notes/hybrid-timeline';
|
||||
this.connection = os.stream.useChannel('hybridTimeline');
|
||||
this.connection = markRaw(os.stream.useChannel('hybridTimeline'));
|
||||
this.connection.on('note', prepend);
|
||||
} else if (this.src == 'global') {
|
||||
endpoint = 'notes/global-timeline';
|
||||
this.connection = os.stream.useChannel('globalTimeline');
|
||||
this.connection = markRaw(os.stream.useChannel('globalTimeline'));
|
||||
this.connection.on('note', prepend);
|
||||
} else if (this.src == 'mentions') {
|
||||
endpoint = 'notes/mentions';
|
||||
this.connection = os.stream.useChannel('main');
|
||||
this.connection = markRaw(os.stream.useChannel('main'));
|
||||
this.connection.on('mention', prepend);
|
||||
} else if (this.src == 'directs') {
|
||||
endpoint = 'notes/mentions';
|
||||
@ -130,16 +130,16 @@ export default defineComponent({
|
||||
prepend(note);
|
||||
}
|
||||
};
|
||||
this.connection = os.stream.useChannel('main');
|
||||
this.connection = markRaw(os.stream.useChannel('main'));
|
||||
this.connection.on('mention', onNote);
|
||||
} else if (this.src == 'list') {
|
||||
endpoint = 'notes/user-list-timeline';
|
||||
this.query = {
|
||||
listId: this.list
|
||||
};
|
||||
this.connection = os.stream.useChannel('userList', {
|
||||
this.connection = markRaw(os.stream.useChannel('userList', {
|
||||
listId: this.list
|
||||
});
|
||||
}));
|
||||
this.connection.on('note', prepend);
|
||||
this.connection.on('userAdded', onUserAdded);
|
||||
this.connection.on('userRemoved', onUserRemoved);
|
||||
@ -148,9 +148,9 @@ export default defineComponent({
|
||||
this.query = {
|
||||
channelId: this.channel
|
||||
};
|
||||
this.connection = os.stream.useChannel('channel', {
|
||||
this.connection = markRaw(os.stream.useChannel('channel', {
|
||||
channelId: this.channel
|
||||
});
|
||||
}));
|
||||
this.connection.on('note', prepend);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user