mirror of
https://github.com/leonboe1/QuickDrop.git
synced 2026-11-23 06:46:03 +00:00
Add wakelock when transferring files
This commit is contained in:
1 parent
0f6fef89fe
commit
f4a21d3f0a
4 files changed
+1580
-1558
No files matched your search
@@ -17,7 +17,7 @@ import SwiftECC
|
||||
class InboundNearbyConnection: NearbyConnection {
|
||||
|
||||
private var currentState: State = .initial
|
||||
private var wasRejected = false
|
||||
public var wasRejected = false
|
||||
public var delegate: InboundNearbyConnectionDelegate?
|
||||
private var cipherCommitment: Data?
|
||||
|
||||
@@ -38,13 +38,11 @@ class InboundNearbyConnection: NearbyConnection {
|
||||
super.disconnect()
|
||||
currentState = .disconnected
|
||||
|
||||
if !self.wasRejected {
|
||||
DispatchQueue.main.async {
|
||||
self.delegate?.connectionWasTerminated(connection: self, error: self.lastError)
|
||||
|
||||
SaveFilesManager.shared.movePendingFilesToTarget()
|
||||
SaveFilesManager.shared.stopAccessingSecurityScopedResource()
|
||||
}
|
||||
DispatchQueue.main.async {
|
||||
self.delegate?.connectionWasTerminated(connection: self, error: self.lastError)
|
||||
|
||||
SaveFilesManager.shared.movePendingFilesToTarget()
|
||||
SaveFilesManager.shared.stopAccessingSecurityScopedResource()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user