Add Damus Share Feature

This PR change adds Damus Share feature to the app that allows the users to share Photos and URLs from foreign apps.

Changelog-Added: Add Damus Share Feature

Signed-off-by: Swift Coder  <scoder1747@gmail.com>
This commit is contained in:
Swift authored and GitHub committed 2024-11-15 17:08:44 -08:00
1 parent 50ef6600a8
commit eeb6547d3e
6 files changed
+1597 -1

No files matched your search

+24
View File
@@ -213,3 +213,27 @@ enum HighlightSource: Hashable {
}
}
}
struct ShareContent {
let title: String
let content: ContentType
enum ContentType {
case link(URL)
case media([PreUploadedMedia])
}
func getLinkURL() -> URL? {
if case let .link(url) = content {
return url
}
return nil
}
func getMediaArray() -> [PreUploadedMedia] {
if case let .media(mediaArray) = content {
return mediaArray
}
return []
}
}