From bdd10cccaa82bf8a1483af1259875bbd2420ea42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20D=E2=80=99Aquino?= Date: Mon, 21 Jul 2025 15:44:44 -0700 Subject: [PATCH] Do not show images twice MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit fixes a logical error in the blocks rendering function. Changelog-None Closes: https://github.com/damus-io/damus/issues/3133 Signed-off-by: Daniel D’Aquino --- damus/Features/Events/Models/NoteContent.swift | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/damus/Features/Events/Models/NoteContent.swift b/damus/Features/Events/Models/NoteContent.swift index d5a87008..676d951d 100644 --- a/damus/Features/Events/Models/NoteContent.swift +++ b/damus/Features/Events/Models/NoteContent.swift @@ -266,14 +266,7 @@ func render_blocks(blocks: borrowing NdbBlockGroup, profiles: Profiles, can_hide invoices.append(inv) case .url(let url): guard let url = URL(string: url.as_str()) else { return .loopContinue } - let url_type = classify_url(url) - switch url_type { - case .media: - urls.append(url_type) - case .link(let url): - urls.append(url_type) - return .loopReturn(str + url_str(url)) - } + return .loopReturn(str + url_str(url)) case .mention_index: return .loopContinue }