diff --git a/Localizable.xcstrings b/Localizable.xcstrings index 66efac742..efa8b8855 100644 --- a/Localizable.xcstrings +++ b/Localizable.xcstrings @@ -18604,9 +18604,6 @@ }, "Sats" : { - }, - "Sats %lld" : { - }, "Sats Estimate %lld" : { diff --git a/Meshtastic/Views/Settings/AppData.swift b/Meshtastic/Views/Settings/AppData.swift index 1d38844de..bed0a9486 100644 --- a/Meshtastic/Views/Settings/AppData.swift +++ b/Meshtastic/Views/Settings/AppData.swift @@ -20,6 +20,13 @@ struct AppData: View { var body: some View { VStack { + + Section(header: Text("phone.gps")) { + if #available(iOS 17.0, macOS 14.0, *) { + GPSStatus() + } + } + Divider() Button(action: { let container = NSPersistentContainer(name: "Meshtastic") guard let url = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first else { @@ -47,7 +54,9 @@ struct AppData: View { .buttonStyle(.bordered) .buttonBorderShape(.capsule) .controlSize(.large) + Divider() } + List(files, id: \.self) { file in HStack { VStack(alignment: .leading ) { diff --git a/Meshtastic/Views/Settings/AppSettings.swift b/Meshtastic/Views/Settings/AppSettings.swift index c840b8c15..8716c1a31 100644 --- a/Meshtastic/Views/Settings/AppSettings.swift +++ b/Meshtastic/Views/Settings/AppSettings.swift @@ -10,7 +10,6 @@ struct AppSettings: View { @EnvironmentObject var bleManager: BLEManager @ObservedObject var tileManager = OfflineTileManager.shared @State var totalDownloadedTileSize = "" - @StateObject var locationHelper = LocationHelper() @State private var isPresentingCoreDataResetConfirm = false @State private var isPresentingDeleteMapTilesConfirm = false var body: some View { @@ -24,44 +23,6 @@ struct AppSettings: View { } } } - Section(header: Text("phone.gps")) { - if #available(iOS 17.0, macOS 14.0, *) { - GPSStatus() - } else { - let accuracy = Measurement(value: locationHelper.locationManager.location?.horizontalAccuracy ?? 300, unit: UnitLength.meters) - let altitiude = Measurement(value: locationHelper.locationManager.location?.altitude ?? 0, unit: UnitLength.meters) - let speed = Measurement(value: locationHelper.locationManager.location?.speed ?? 0, unit: UnitSpeed.kilometersPerHour) - HStack { - Label("Accuracy \(accuracy.formatted())", systemImage: "scope") - .font(.footnote) - Label("Sats \(LocationHelper.satsInView)", systemImage: "sparkles") - .font(.footnote) - } - Label("Coordinate \(String(format: "%.5f", locationHelper.locationManager.location?.coordinate.latitude ?? 0)), \(String(format: "%.5f", locationHelper.locationManager.location?.coordinate.longitude ?? 0))", systemImage: "mappin") - .font(.footnote) - .textSelection(.enabled) - if locationHelper.locationManager.location?.verticalAccuracy ?? 0 > 0 { - Label("Altitude \(altitiude.formatted())", systemImage: "mountain.2") - .font(.footnote) - } - if locationHelper.locationManager.location?.courseAccuracy ?? 0 > 0 { - let degrees = Angle.degrees(locationHelper.locationManager.location?.course ?? 0) - Label { - let heading = Measurement(value: degrees.degrees, unit: UnitAngle.degrees) - Text("Heading: \(heading.formatted(.measurement(width: .narrow)))") - } icon: { - Image(systemName: "location.north") - .symbolRenderingMode(.hierarchical) - .rotationEffect(degrees) - } - .font(.footnote) - } - if locationHelper.locationManager.location?.speedAccuracy ?? 0 > 0 { - Label("Speed \(speed.formatted())", systemImage: "speedometer") - .font(.footnote) - } - } - } Section(header: Text("App Data")) { Button { isPresentingCoreDataResetConfirm = true