mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-17 15:09:31 +02:00
Fix a race condition when sending multiple images.
This commit is contained in:
@@ -96,11 +96,13 @@ public class ShareExtensionShareItemProvider: NSObject {
|
||||
|
||||
shareExtensionItem.loaded = false
|
||||
shareExtensionItem.itemProvider.loadItem(forTypeIdentifier: typeIdentifier, options: nil) { result, error in
|
||||
if error == nil {
|
||||
shareExtensionItem.loaded = true
|
||||
}
|
||||
|
||||
DispatchQueue.main.async {
|
||||
// Mark the item as loaded when back on the main queue to avoid
|
||||
// a race condition where the share extension sends duplicates.
|
||||
if error == nil {
|
||||
shareExtensionItem.loaded = true
|
||||
}
|
||||
|
||||
completion(result, error)
|
||||
}
|
||||
}
|
||||
|
||||
1
changelog.d/5922.bugfix
Normal file
1
changelog.d/5922.bugfix
Normal file
@@ -0,0 +1 @@
|
||||
Share Extension: Fix a bug where sending multiple images sometimes resulted in additional duplicates being sent.
|
||||
Reference in New Issue
Block a user