mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Add support for sharing URLs and text. (#3546)
* Add support for sharing URLs and text. * Fix a bug where a stored draft would overwrite the shared text. * Add tests.
This commit is contained in:
@@ -13,6 +13,15 @@ enum ShareExtensionConstants {
|
||||
|
||||
enum ShareExtensionPayload: Hashable, Codable {
|
||||
case mediaFile(roomID: String?, mediaFile: ShareExtensionMediaFile)
|
||||
case text(roomID: String?, text: String)
|
||||
|
||||
var roomID: String? {
|
||||
switch self {
|
||||
case .mediaFile(let roomID, _),
|
||||
.text(let roomID, _):
|
||||
roomID
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct ShareExtensionMediaFile: Hashable, Codable {
|
||||
|
||||
Reference in New Issue
Block a user