mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Git rid of extra environment variable
This commit is contained in:
parent
9e8290c46b
commit
247ec497a7
7 changed files with 10 additions and 15 deletions
|
|
@ -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" : {
|
||||
|
|
|
|||
|
|
@ -210,7 +210,5 @@ struct MeshtasticAppleApp: App {
|
|||
.environment(\.managedObjectContext, persistenceController.container.viewContext)
|
||||
.environmentObject(appState)
|
||||
.environmentObject(accessoryManager)
|
||||
.environmentObject(appState.router)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue