damus

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

commit 7a8bfffc298fbebbb6816c37512c5f4578934ead
parent c35331ceda3f12f6d15ffea0a5672197ed399d23
Author: Bryan Montz <bryanmontz@me.com>
Date:   Sat,  6 May 2023 07:16:39 -0500

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

Diffstat:
Mdamus/Views/PostView.swift | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git 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)