mirror of
https://github.com/leonboe1/QuickDrop.git
synced 2026-11-20 05:16:02 +00:00
Extract pairing proto
This commit is contained in:
1 parent
ea213906d6
commit
c46f6eedbc
8 files changed
+479
-271
No files matched your search
@@ -362,9 +362,9 @@ public class NearbyConnectionManager: NSObject, NetServiceDelegate, InboundNearb
|
||||
func connectionWasTerminated(connection: InboundNearbyConnection, savedFiles: [URL], error: Error?) {
|
||||
incomingConnections.removeValue(forKey: connection.id)
|
||||
|
||||
// Notification-sync transfers suppress normal success callbacks, but
|
||||
// Control transfers suppress normal success callbacks, but
|
||||
// still forward failures so pending consent/error UI can be cleaned up.
|
||||
if connection.isMirroredNotificationTransfer, error == nil {
|
||||
if connection.isControlTransfer, error == nil {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -400,12 +400,12 @@ public class NearbyConnectionManager: NSObject, NetServiceDelegate, InboundNearb
|
||||
transferID: String,
|
||||
accept: Bool,
|
||||
trustDevice: Bool,
|
||||
notificationSyncToken: String? = nil
|
||||
pairingToken: String? = nil
|
||||
) {
|
||||
guard let conn = incomingConnections[transferID] else { return }
|
||||
|
||||
log("[NearbyConnectionManager] Submitting user consent for transfer \(transferID), accepted: \(accept)")
|
||||
conn.submitUserConsent(accepted: accept, trustDevice: trustDevice, notificationSyncToken: notificationSyncToken)
|
||||
conn.submitUserConsent(accepted: accept, trustDevice: trustDevice, pairingToken: pairingToken)
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user