commit bdd10cccaa82bf8a1483af1259875bbd2420ea42
parent e9f4cbe881d8111f083966f78559f83aba92d9b6
Author: Daniel D’Aquino <daniel@daquino.me>
Date: Mon, 21 Jul 2025 15:44:44 -0700
Do not show images twice
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 <daniel@daquino.me>
Diffstat:
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git 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
}