mirror of
https://github.com/leonboe1/QuickDrop.git
synced 2026-11-22 14:26:01 +00:00
Fix notification sync sematics
This commit is contained in:
1 parent
159e83179b
commit
55e2a72a90
2 files changed
+4
-2
No files matched your search
@@ -611,7 +611,7 @@ class InboundNearbyConnection: NearbyConnection {
|
|||||||
id: id,
|
id: id,
|
||||||
pinCode: pinCode,
|
pinCode: pinCode,
|
||||||
transferType: .notificationSync,
|
transferType: .notificationSync,
|
||||||
allowsToBeAddedAsTrustedDevice: false
|
allowsToBeAddedAsTrustedDevice: true
|
||||||
)
|
)
|
||||||
|
|
||||||
DispatchQueue.main.async {
|
DispatchQueue.main.async {
|
||||||
|
|||||||
@@ -361,7 +361,9 @@ public class NearbyConnectionManager: NSObject, NetServiceDelegate, InboundNearb
|
|||||||
func connectionWasTerminated(connection: InboundNearbyConnection, savedFiles: [URL], error: Error?) {
|
func connectionWasTerminated(connection: InboundNearbyConnection, savedFiles: [URL], error: Error?) {
|
||||||
incomingConnections.removeValue(forKey: connection.id)
|
incomingConnections.removeValue(forKey: connection.id)
|
||||||
|
|
||||||
if connection.shouldSuppressAppDelegates {
|
// Notification-sync transfers suppress normal success callbacks, but
|
||||||
|
// still forward failures so pending consent/error UI can be cleaned up.
|
||||||
|
if connection.shouldSuppressAppDelegates, error == nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user