diff --git a/Localizable.xcstrings b/Localizable.xcstrings index 44aa74bb..c725645e 100644 --- a/Localizable.xcstrings +++ b/Localizable.xcstrings @@ -20936,9 +20936,8 @@ } } }, - "Meshtastic does not collect any personal information. We do anonymously collect usage and crash data to improve the app. This helps us understand how the app is being used and where we can make improvements. The data we collect is non-personally identifiable and cannot be linked to you as an individual. You can opt out of this under app settings." : { - "comment" : "Privacy policy text for Meshtastic.", - "isCommentAutoGenerated" : true + "Meshtastic does not collect any personal information. We do anonymously collect usage and crash data to improve the app. You can opt out under app settings." : { + }, "Meshtastic Node %@ has shared channels with you" : { "localizations" : { diff --git a/Meshtastic/MeshtasticApp.swift b/Meshtastic/MeshtasticApp.swift index 466ed67a..c773d78c 100644 --- a/Meshtastic/MeshtasticApp.swift +++ b/Meshtastic/MeshtasticApp.swift @@ -210,7 +210,5 @@ struct MeshtasticAppleApp: App { .environment(\.managedObjectContext, persistenceController.container.viewContext) .environmentObject(appState) .environmentObject(accessoryManager) - .environmentObject(appState.router) } - } diff --git a/Meshtastic/Views/Messages/ChannelMessageList.swift b/Meshtastic/Views/Messages/ChannelMessageList.swift index ba0bc701..be3959d2 100644 --- a/Meshtastic/Views/Messages/ChannelMessageList.swift +++ b/Meshtastic/Views/Messages/ChannelMessageList.swift @@ -12,7 +12,6 @@ import SwiftUI struct ChannelMessageList: View { @EnvironmentObject var appState: AppState - @EnvironmentObject var router: Router @Environment(\.scenePhase) var scenePhase @Environment(\.managedObjectContext) var context @EnvironmentObject var accessoryManager: AccessoryManager @@ -61,7 +60,7 @@ struct ChannelMessageList: View { } private func routerIsShowingThisChannel() -> Bool { - guard router.navigationState.selectedTab == .messages else { return false } + guard appState.router.navigationState.selectedTab == .messages else { return false } return scenePhase == .active } diff --git a/Meshtastic/Views/Messages/ChannelMessageRow.swift b/Meshtastic/Views/Messages/ChannelMessageRow.swift index 9e3c8124..eb0f2a9f 100644 --- a/Meshtastic/Views/Messages/ChannelMessageRow.swift +++ b/Meshtastic/Views/Messages/ChannelMessageRow.swift @@ -3,7 +3,7 @@ import MeshtasticProtobufs import SwiftUI struct ChannelMessageRow: View { - @EnvironmentObject var router: Router + @EnvironmentObject var appState: AppState // Core Data object observed for changes (like Tapbacks being received) @ObservedObject var message: MessageEntity @@ -98,7 +98,7 @@ struct ChannelMessageRow: View { CircleText(text: message.fromUser?.shortName ?? "?", color: Color(UIColor(hex: UInt32(message.fromUser?.num ?? 0))), circleSize: 50) .onTapGesture(count: 2) { if let nodeNum = message.fromUser?.num { - router.navigateToNodeDetail(nodeNum: Int64(nodeNum)) + appState.router.navigateToNodeDetail(nodeNum: Int64(nodeNum)) } } .padding(.all, 5).offset(y: -7) diff --git a/Meshtastic/Views/Messages/UserMessageList.swift b/Meshtastic/Views/Messages/UserMessageList.swift index 394431d5..9a3425bc 100644 --- a/Meshtastic/Views/Messages/UserMessageList.swift +++ b/Meshtastic/Views/Messages/UserMessageList.swift @@ -12,7 +12,6 @@ import MeshtasticProtobufs // Added to ensure RoutingError is accessible if need struct UserMessageList: View { @EnvironmentObject var appState: AppState - @EnvironmentObject var router: Router @EnvironmentObject var accessoryManager: AccessoryManager @Environment(\.scenePhase) var scenePhase @Environment(\.managedObjectContext) var context @@ -58,7 +57,7 @@ struct UserMessageList: View { } private func routerIsShowingThisUser() -> Bool { - guard router.navigationState.selectedTab == .messages else { return false } + guard appState.router.navigationState.selectedTab == .messages else { return false } return scenePhase == .active } diff --git a/Meshtastic/Views/Messages/UserMessageRow.swift b/Meshtastic/Views/Messages/UserMessageRow.swift index 00579fb3..d469462b 100644 --- a/Meshtastic/Views/Messages/UserMessageRow.swift +++ b/Meshtastic/Views/Messages/UserMessageRow.swift @@ -11,7 +11,7 @@ import SwiftUI struct UserMessageRow: View { - @EnvironmentObject var router: Router + @EnvironmentObject var appState: AppState @ObservedObject var message: MessageEntity let allMessages: [MessageEntity] let previousMessage: MessageEntity? @@ -105,7 +105,7 @@ struct UserMessageRow: View { CircleText(text: message.fromUser?.shortName ?? "?", color: Color(UIColor(hex: UInt32(message.fromUser?.num ?? 0))), circleSize: 50) .onTapGesture(count: 2) { if let nodeNum = message.fromUser?.num { - router.navigateToNodeDetail(nodeNum: Int64(nodeNum)) + appState.router.navigateToNodeDetail(nodeNum: Int64(nodeNum)) } } .padding(.all, 5).offset(y: -7) diff --git a/Meshtastic/Views/Nodes/Helpers/Map/PositionPopover.swift b/Meshtastic/Views/Nodes/Helpers/Map/PositionPopover.swift index e9d11aa4..2e5e2809 100644 --- a/Meshtastic/Views/Nodes/Helpers/Map/PositionPopover.swift +++ b/Meshtastic/Views/Nodes/Helpers/Map/PositionPopover.swift @@ -12,7 +12,7 @@ struct PositionPopover: View { @ObservedObject var locationsHandler = LocationsHandler.shared @Environment(\.managedObjectContext) var context - @EnvironmentObject var router: Router + @EnvironmentObject var appState: AppState private var idiom: UIUserInterfaceIdiom { UIDevice.current.userInterfaceIdiom } @Environment(\.dismiss) private var dismiss @Environment(\.openURL) var openURL @@ -29,7 +29,7 @@ struct PositionPopover: View { ZStack { Button { if let nodeNum = position.nodePosition?.num { - router.navigateToNodeDetail(nodeNum: Int64(nodeNum)) + appState.router.navigateToNodeDetail(nodeNum: Int64(nodeNum)) dismiss() } } label: {