This commit is contained in:
parent
52a58802b7
commit
844d31f10c
|
@ -476,7 +476,7 @@ function showReactions(): void {
|
||||||
}, {}, 'closed');
|
}, {}, 'closed');
|
||||||
}
|
}
|
||||||
|
|
||||||
const unuse = ref<() => void>();
|
const unuse = ref<(x?: boolean) => void>();
|
||||||
|
|
||||||
unuse.value = noteManager.useNote(appearNote.value?.id ?? props.note.id, true).unuse;
|
unuse.value = noteManager.useNote(appearNote.value?.id ?? props.note.id, true).unuse;
|
||||||
|
|
||||||
|
@ -504,7 +504,7 @@ onDeactivated(() => {
|
||||||
// 不要なキャッシュ消去や通信を防止するため遅延させる
|
// 不要なキャッシュ消去や通信を防止するため遅延させる
|
||||||
if (_unuse) {
|
if (_unuse) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
_unuse();
|
_unuse(true);
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -335,7 +335,7 @@ export class NoteManager {
|
||||||
this.captureing.set(id, 1);
|
this.captureing.set(id, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
private decapture(id: string): void {
|
private decapture(id: string, noDeletion = false): void {
|
||||||
if (!this.notesSource.has(id)) return;
|
if (!this.notesSource.has(id)) return;
|
||||||
|
|
||||||
const captureingNumber = this.captureing.get(id);
|
const captureingNumber = this.captureing.get(id);
|
||||||
|
@ -351,7 +351,7 @@ export class NoteManager {
|
||||||
this.captureing.delete(id);
|
this.captureing.delete(id);
|
||||||
|
|
||||||
// キャプチャが終わったらcomputedキャッシュも消してしまう
|
// キャプチャが終わったらcomputedキャッシュも消してしまう
|
||||||
this.notesComputed.delete(id);
|
if (!noDeletion) this.notesComputed.delete(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -373,10 +373,10 @@ export class NoteManager {
|
||||||
using = true;
|
using = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
const unuse = () => {
|
const unuse = (noDeletion = false) => {
|
||||||
CapturePromise.then(() => {
|
CapturePromise.then(() => {
|
||||||
if (!using) return;
|
if (!using) return;
|
||||||
this.decapture(id);
|
this.decapture(id, noDeletion);
|
||||||
using = false;
|
using = false;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue