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
2024-11-15 20:08:44 -05:00
committed by GitHub
parent 50ef6600a8
commit eeb6547d3e
6 changed files with 1597 additions and 1 deletions

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 []
}
}