mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Fix lingering scanned but missing ble devices
This commit is contained in:
parent
b6e7f614a5
commit
4847731402
2 changed files with 4 additions and 4 deletions
|
|
@ -755,7 +755,7 @@
|
|||
CODE_SIGN_ENTITLEMENTS = MeshtasticClient/MeshtasticClient.entitlements;
|
||||
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 8;
|
||||
CURRENT_PROJECT_VERSION = 9;
|
||||
DEVELOPMENT_ASSET_PATHS = "\"MeshtasticClient/Preview Content\"";
|
||||
DEVELOPMENT_TEAM = GCH7VS5Y9R;
|
||||
ENABLE_PREVIEWS = YES;
|
||||
|
|
@ -787,7 +787,7 @@
|
|||
CODE_SIGN_ENTITLEMENTS = MeshtasticClient/MeshtasticClient.entitlements;
|
||||
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 8;
|
||||
CURRENT_PROJECT_VERSION = 9;
|
||||
DEVELOPMENT_ASSET_PATHS = "\"MeshtasticClient/Preview Content\"";
|
||||
DEVELOPMENT_TEAM = GCH7VS5Y9R;
|
||||
ENABLE_PREVIEWS = YES;
|
||||
|
|
|
|||
|
|
@ -195,8 +195,8 @@ class BLEManager: NSObject, ObservableObject, CBCentralManagerDelegate, CBPeriph
|
|||
}
|
||||
|
||||
let today = Date()
|
||||
let oneMinuteAgo = Calendar.current.date(byAdding: .minute, value: -1, to: today)!
|
||||
peripherals.removeAll(where: { $0.lastUpdate <= oneMinuteAgo})
|
||||
let visibleDuration = Calendar.current.date(byAdding: .second, value: -5, to: today)!
|
||||
peripherals.removeAll(where: { $0.lastUpdate <= visibleDuration})
|
||||
}
|
||||
|
||||
// Called when a peripheral is connected
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue