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