damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | README | LICENSE

commit 6fffe250c28a1ee2c84f6b95c316b543c3e3a5e7
parent 1e7d9a6373d359b498faafc5f7680babed2e5030
Author: gladiusKatana <garthsnyder@protonmail.com>
Date:   Mon, 13 Mar 2023 00:02:57 -0400

Fix some links getting interpreted as images

Changelog-Fixed: Fix some links getting interpreted as images
Closes: #774
Fixes: #766

Diffstat:
Mdamus/Views/NoteContentView.swift | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/damus/Views/NoteContentView.swift b/damus/Views/NoteContentView.swift @@ -240,7 +240,8 @@ func render_blocks(blocks: [Block], profiles: Profiles, privkey: String?) -> Not func is_image_url(_ url: URL) -> Bool { let str = url.lastPathComponent.lowercased() - return str.hasSuffix("png") || str.hasSuffix("jpg") || str.hasSuffix("jpeg") || str.hasSuffix("gif") + let isUrl = str.hasSuffix(".png") || str.hasSuffix(".jpg") || str.hasSuffix(".jpeg") || str.hasSuffix(".gif") + return isUrl } func lookup_cached_preview_size(previews: PreviewCache, evid: String) -> CGFloat? {