Re-enable mesh map setting, fix nil node bug

This commit is contained in:
Garth Vander Houwen 2022-02-23 20:11:02 -10:00
parent 54b08e8c1d
commit d3ac782773
3 changed files with 7 additions and 7 deletions

View file

@ -40,7 +40,7 @@
<key>LSRequiresIPhoneOS</key>
<true/>
<key>LSSupportsOpeningDocumentsInPlace</key>
<false/>
<true/>
<key>NSBluetoothAlwaysUsageDescription</key>
<string>We use bluetooth to connect to nearby Meshtastic Devices</string>
<key>NSBluetoothPeripheralUsageDescription</key>

View file

@ -271,7 +271,7 @@ struct NodeDetail: View {
.padding(1)
}
}
.navigationTitle(node != nil ? String(node.user!.longName ?? "Unknown") : "Unknown")
.navigationTitle((node != nil && node.user != nil) ? String(node.user!.longName ?? "Unknown") : "Unknown")
.navigationBarTitleDisplayMode(.inline)
.navigationBarItems(trailing:

View file

@ -174,12 +174,12 @@ struct AppSettings: View {
// TextField("Custom Tile Server", text: $userSettings.meshMapCustomTileServer)
}
Section(header: Text("DEBUG")) {
// Toggle(isOn: $userSettings.meshActivityLog) {
Toggle(isOn: $userSettings.meshActivityLog) {
// Label("Log all Mesh activity", systemImage: "network")
// }
// .toggleStyle(SwitchToggleStyle(tint: .accentColor))
if true {// userSettings.meshActivityLog {
Label("Log all Mesh activity", systemImage: "network")
}
.toggleStyle(SwitchToggleStyle(tint: .accentColor))
if userSettings.meshActivityLog {
NavigationLink(destination: MeshLog()) {
Text("View Mesh Log")
}