Fix message spacing and remove markdown link support

- Reduce VStack spacing from 4 to 2 and nested VStack from 2 to 0
- Set list row insets top/bottom to 0 to minimize spacing on iPhone
- Remove all markdown link parsing and formatting
- Share plain URLs instead of markdown when using share extension
- Keep only plain text URL detection and preview functionality
This commit is contained in:
jack
2025-07-24 12:47:49 +02:00
parent f45c52e9d3
commit b480a4836c
4 changed files with 19 additions and 89 deletions
+4 -6
View File
@@ -98,14 +98,12 @@ struct BitchatApp: App {
// Try to parse as JSON first
if let data = sharedContent.data(using: .utf8),
let urlData = try? JSONSerialization.jsonObject(with: data) as? [String: String],
let url = urlData["url"],
let title = urlData["title"] {
// Send just emoji with hidden markdown link
let markdownLink = "👇 [\(title)](\(url))"
self.chatViewModel.sendMessage(markdownLink)
let url = urlData["url"] {
// Send plain URL
self.chatViewModel.sendMessage(url)
} else {
// Fallback to simple URL
self.chatViewModel.sendMessage("Shared link: \(sharedContent)")
self.chatViewModel.sendMessage(sharedContent)
}
} else {
self.chatViewModel.sendMessage(sharedContent)