mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-23 10:02:46 +02:00
vector-im/element-ios/issues/5009 - Implemented multi-room forwarding and added various tweaks following code review.
This commit is contained in:
@@ -60,6 +60,12 @@ private class SimpleShareItem: ShareItemProtocol {
|
||||
|
||||
let items: [ShareItemProtocol]
|
||||
|
||||
private override init() {
|
||||
attachment = nil
|
||||
textMessage = nil
|
||||
self.items = []
|
||||
}
|
||||
|
||||
@objc public init(withAttachment attachment: MXKAttachment) {
|
||||
self.attachment = attachment
|
||||
self.items = [SimpleShareItem(withAttachment: attachment)];
|
||||
@@ -78,10 +84,18 @@ private class SimpleShareItem: ShareItemProtocol {
|
||||
return
|
||||
}
|
||||
|
||||
attachment?.prepareShare({ url in
|
||||
completion(url, nil)
|
||||
guard let attachment = attachment else {
|
||||
fatalError("[SimpleShareItemProvider] Invalid item provider state.")
|
||||
}
|
||||
|
||||
attachment.prepareShare({ url in
|
||||
DispatchQueue.main.async {
|
||||
completion(url, nil)
|
||||
}
|
||||
}, failure: { error in
|
||||
completion(nil, error)
|
||||
DispatchQueue.main.async {
|
||||
completion(nil, error)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user