mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Minimum expiry for PKI nodes
This commit is contained in:
parent
6ed183d155
commit
0f21ea9599
2 changed files with 5 additions and 1 deletions
|
|
@ -13,7 +13,7 @@ public func clearStaleNodes(nodeExpireDays: Int, context: NSManagedObjectContext
|
|||
return TimeInterval(-nodeExpireDays * 86400)
|
||||
}
|
||||
var nodePKIExpireTime: TimeInterval {
|
||||
return TimeInterval(-7 * 86400)
|
||||
return TimeInterval((nodeExpireDays < 7 ? -7 : -nodeExpireDays) * 86400)
|
||||
}
|
||||
|
||||
if nodeExpireDays == 0 {
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import MapKit
|
|||
import OSLog
|
||||
|
||||
struct AppSettings: View {
|
||||
private var idiom: UIUserInterfaceIdiom { UIDevice.current.userInterfaceIdiom }
|
||||
@Environment(\.managedObjectContext) var context
|
||||
@EnvironmentObject var bleManager: BLEManager
|
||||
@State var totalDownloadedTileSize = ""
|
||||
|
|
@ -71,6 +72,9 @@ struct AppSettings: View {
|
|||
Text("180")
|
||||
}
|
||||
}
|
||||
Text("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.")
|
||||
.foregroundStyle(.secondary)
|
||||
.font(idiom == .phone ? .caption : .callout)
|
||||
}
|
||||
Button {
|
||||
isPresentingCoreDataResetConfirm = true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue