mirror of
https://github.com/usatiuk/cardboy.git
synced 2025-10-28 15:17:48 +01:00
rescan fix
This commit is contained in:
@@ -154,17 +154,19 @@ final class TimeSyncManager: NSObject, ObservableObject {
|
||||
func forceRescan() {
|
||||
statusMessage = "Restarting scan…"
|
||||
shouldKeepScanning = true
|
||||
retryWorkItem?.cancel()
|
||||
|
||||
let existingPeripheral = targetPeripheral
|
||||
stopScanning()
|
||||
if let existingPeripheral {
|
||||
central.cancelPeripheralConnection(existingPeripheral)
|
||||
}
|
||||
|
||||
targetPeripheral = nil
|
||||
timeCharacteristic = nil
|
||||
fileCommandCharacteristic = nil
|
||||
fileResponseCharacteristic = nil
|
||||
currentDirectory = "/"
|
||||
directoryEntries = []
|
||||
isFileBusy = false
|
||||
pendingListOperationID = nil
|
||||
simpleOperationID = nil
|
||||
clearOperation()
|
||||
resetFileStateOnDisconnect()
|
||||
startScanning()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user