From 7a8bfffc298fbebbb6816c37512c5f4578934ead Mon Sep 17 00:00:00 2001 From: Bryan Montz Date: Sat, 6 May 2023 07:16:39 -0500 Subject: [PATCH] Fix posts with no uploadedURLs always get two blank spaces at the end Changelog-Fixed: Fix posts with no uploadedURLs always get two blank spaces at the end Closes: #1101 --- damus/Views/PostView.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/damus/Views/PostView.swift b/damus/Views/PostView.swift index 44afe3ab..0f743256 100644 --- a/damus/Views/PostView.swift +++ b/damus/Views/PostView.swift @@ -86,8 +86,10 @@ struct PostView: View { let imagesString = uploadedMedias.map { $0.uploadedURL.absoluteString }.joined(separator: " ") let img_meta_tags = uploadedMedias.compactMap { $0.metadata?.to_tag() } - - content.append(" " + imagesString + " ") + + if !imagesString.isEmpty { + content.append(" " + imagesString + " ") + } if case .quoting(let ev) = action, let id = bech32_note_id(ev.id) { content.append(" nostr:" + id)