mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Address code review feedback: use @ObservedObject for LocationsHandler, fix firmware label
Agent-Logs-Url: https://github.com/meshtastic/Meshtastic-Apple/sessions/449fe2d6-dec9-4509-920e-e6196ca11d65 Co-authored-by: garthvh <1795163+garthvh@users.noreply.github.com>
This commit is contained in:
parent
eabb9a9d30
commit
8c6f61ff5c
2 changed files with 3 additions and 5 deletions
|
|
@ -14,6 +14,7 @@ struct DeviceOnboarding: View {
|
|||
}
|
||||
|
||||
@EnvironmentObject var accessoryManager: AccessoryManager
|
||||
@ObservedObject private var locationsHandler: LocationsHandler = .shared
|
||||
@State var navigationPath: [SetupGuide] = []
|
||||
@State var locationStatus = LocationsHandler.shared.manager.authorizationStatus
|
||||
@AppStorage("provideLocation") private var provideLocation: Bool = false
|
||||
|
|
@ -239,10 +240,7 @@ struct DeviceOnboarding: View {
|
|||
title: String(localized: "Battery Usage"),
|
||||
subtitle: String(localized: "Enabling background activity may increase battery usage. You can toggle this at any time in the app settings.")
|
||||
)
|
||||
Toggle(isOn: Binding(
|
||||
get: { LocationsHandler.shared.backgroundActivity },
|
||||
set: { LocationsHandler.shared.backgroundActivity = $0 }
|
||||
)) {
|
||||
Toggle(isOn: $locationsHandler.backgroundActivity) {
|
||||
Label {
|
||||
Text("Enable Background Activity")
|
||||
} icon: {
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ struct Firmware: View {
|
|||
.foregroundStyle(.red)
|
||||
.font(.title2)
|
||||
.padding(.bottom)
|
||||
Text("Current Firmware Version: \(connectedVersion), Latest Firmware Version: \(accessoryManager.minimumVersion)")
|
||||
Text("Current Firmware Version: \(connectedVersion), Minimum Required Version: \(accessoryManager.minimumVersion)")
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.font(.title3)
|
||||
.padding(.bottom)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue