From 67a2b0631fcce0a1389d9254caf6e20264fafd02 Mon Sep 17 00:00:00 2001 From: Garth Vander Houwen Date: Thu, 19 Jun 2025 16:14:09 -0700 Subject: [PATCH] Bump timer to every hour, fix spelling typo --- Localizable.xcstrings | 3 +++ Meshtastic/Helpers/BLEManager.swift | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Localizable.xcstrings b/Localizable.xcstrings index ee4749a8..99f6dd10 100644 --- a/Localizable.xcstrings +++ b/Localizable.xcstrings @@ -19830,6 +19830,9 @@ } } } + }, + "Nodes without PKI keys are cleared from the app database on the schedule set by the user, nodes with PKI keys are cleared only if the interval is set to 7 days or longer. This feature only purges nodes from the app that are not stored in the device node database." : { + }, "None" : { "localizations" : { diff --git a/Meshtastic/Helpers/BLEManager.swift b/Meshtastic/Helpers/BLEManager.swift index 51b01ba7..06033468 100644 --- a/Meshtastic/Helpers/BLEManager.swift +++ b/Meshtastic/Helpers/BLEManager.swift @@ -87,8 +87,8 @@ class BLEManager: NSObject, CBPeripheralDelegate, MqttClientProxyManagerDelegate super.init() centralManager = CBCentralManager(delegate: self, queue: nil) mqttManager.delegate = self - // Run clearStaleNodes every 10 minutes - maintenenceTimer = Timer.scheduledTimer(withTimeInterval: 60, repeats: true, block: { _ in + // Run clearStaleNodes every hour + maintenanceTimer = Timer.scheduledTimer(withTimeInterval: 3600, repeats: true, block: { _ in let result = clearStaleNodes(nodeExpireDays: Int(self.purgeStaleNodeDays), context: self.context) // If you are connected and the clear worked, pull nodes back from the node in case we have deleted anything from that app that is in the device nodedb if result && self.isSubscribed {