From a8202d89f89613bb6c8f1ce5b4cc4b6c2de600ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20D=E2=80=99Aquino?= Date: Fri, 31 Oct 2025 10:33:40 -0700 Subject: [PATCH] Remove unnecessary wait in note rendering MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously, the note content rendering logic would wait for the note and its blocks to be available in NostrDB before displaying the parsed version of the note to the user. However, it is now possible to parse those on demand, and there are code paths to ensure that it will do so if those parsed blocks are not readily available from NostrDB. Therefore, the wait is not necessary, and removing it fixes the delay we have been experiencing. The issue was likely introduced after the last public release, so no changelog item is needed Changelog-None Closes: https://github.com/damus-io/damus/issues/3296 Signed-off-by: Daniel D’Aquino --- damus/Features/Events/Models/NoteContent.swift | 6 ------ 1 file changed, 6 deletions(-) diff --git a/damus/Features/Events/Models/NoteContent.swift b/damus/Features/Events/Models/NoteContent.swift index 78209d8d..671a2f23 100644 --- a/damus/Features/Events/Models/NoteContent.swift +++ b/damus/Features/Events/Models/NoteContent.swift @@ -83,12 +83,6 @@ func render_immediately_available_note_content(ndb: Ndb, ev: NostrEvent, profile actor ContentRenderer { func render_note_content(ndb: Ndb, ev: NostrEvent, profiles: Profiles, keypair: Keypair) async -> NoteArtifacts { - if ev.known_kind == .dm { - // Use the enhanced render_immediately_available_note_content which now handles DMs properly - // by decrypting and parsing the content with ndb_parse_content - return render_immediately_available_note_content(ndb: ndb, ev: ev, profiles: profiles, keypair: keypair) - } - let result = try? await ndb.waitFor(noteId: ev.id, timeout: 3) return render_immediately_available_note_content(ndb: ndb, ev: ev, profiles: profiles, keypair: keypair) } }