From fc0d9366d819e6a56575e001a677fdc194e3f0fd Mon Sep 17 00:00:00 2001 From: tamaina Date: Fri, 4 Aug 2023 10:53:26 +0000 Subject: [PATCH] =?UTF-8?q?=E5=89=8A=E9=99=A4=E6=99=82=E3=81=AE=E6=8C=99?= =?UTF-8?q?=E5=8B=95=E3=82=92=E3=81=A1=E3=82=83=E3=82=93=E3=81=A8=E3=81=99?= =?UTF-8?q?=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/frontend/src/scripts/entity-manager.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/frontend/src/scripts/entity-manager.ts b/packages/frontend/src/scripts/entity-manager.ts index d3c413d8c4..5fb63cc8c0 100644 --- a/packages/frontend/src/scripts/entity-manager.ts +++ b/packages/frontend/src/scripts/entity-manager.ts @@ -224,6 +224,10 @@ export class NoteManager { public async fetch(id: string, force = false): Promise { if (!force) { const cachedNote = this.get(id); + if (cachedNote.value === null) { + // 削除されている場合はnullを返す + return cachedNote; + } // Renoteの場合はRenote元の更新日時も考慮する const updatedAt = isRenote(cachedNote.value) ? this.updatedAt.get(id) : @@ -311,6 +315,10 @@ export class NoteManager { case 'deleted': { note.value = null; + this.connection?.send('un', { id }); + this.captureing.delete(id); + this.notesComputed.delete(id); + this.updatedAt.delete(id); break; } }