Fix some links getting interpreted as images

Changelog-Fixed: Fix some links getting interpreted as images
Closes: #774
Fixes: #766
This commit is contained in:
gladiusKatana
2023-03-13 00:02:57 -04:00
committed by William Casarin
parent 1e7d9a6373
commit 6fffe250c2

View File

@@ -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? {