This commit is contained in:
tamaina 2023-08-03 10:39:29 +00:00
parent 52a58802b7
commit 844d31f10c
2 changed files with 6 additions and 6 deletions

View File

@ -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);
} }
}); });

View File

@ -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;
}); });
}; };