@@ -1,7 +1,7 @@
|
||||
import { ref } from 'vue';
|
||||
import { DriveFile } from 'misskey-js/built/entities';
|
||||
import * as os from '@/os';
|
||||
import { stream } from '@/stream';
|
||||
import { useStream } from '@/stream';
|
||||
import { i18n } from '@/i18n';
|
||||
import { defaultStore } from '@/store';
|
||||
import { uploadFile } from '@/scripts/upload';
|
||||
@@ -51,7 +51,7 @@ export function chooseFileFromUrl(): Promise<DriveFile> {
|
||||
|
||||
const marker = Math.random().toString(); // TODO: UUIDとか使う
|
||||
|
||||
const connection = stream.useChannel('main');
|
||||
const connection = useStream().useChannel('main');
|
||||
connection.on('urlUploadFinished', urlResponse => {
|
||||
if (urlResponse.marker === marker) {
|
||||
res(urlResponse.file);
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { onUnmounted, Ref } from 'vue';
|
||||
import * as misskey from 'misskey-js';
|
||||
import { stream } from '@/stream';
|
||||
import { useStream } from '@/stream';
|
||||
import { $i } from '@/account';
|
||||
|
||||
export function useNoteCapture(props: {
|
||||
@@ -9,7 +9,7 @@ export function useNoteCapture(props: {
|
||||
isDeletedRef: Ref<boolean>;
|
||||
}) {
|
||||
const note = props.note;
|
||||
const connection = $i ? stream : null;
|
||||
const connection = $i ? useStream() : null;
|
||||
|
||||
function onStreamNoteUpdated(noteData): void {
|
||||
const { type, id, body } = noteData;
|
||||
|
Reference in New Issue
Block a user