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