mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Fix a couple of nils
This commit is contained in:
parent
836b3fb007
commit
b4b158aabf
2 changed files with 3 additions and 5 deletions
|
|
@ -520,8 +520,8 @@ class BLEManager: NSObject, ObservableObject, CBCentralManagerDelegate, CBPeriph
|
|||
if nodeInfo != nil {
|
||||
if self.connectedPeripheral != nil && self.connectedPeripheral.num == nodeInfo!.num {
|
||||
if nodeInfo!.user != nil {
|
||||
connectedPeripheral.shortName = nodeInfo!.user!.shortName ?? "????"
|
||||
connectedPeripheral.longName = nodeInfo!.user!.longName ?? "Unknown"
|
||||
connectedPeripheral.shortName = nodeInfo?.user?.shortName ?? "????"
|
||||
connectedPeripheral.longName = nodeInfo?.user?.longName ?? "Unknown"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,15 +7,13 @@ import CoreData
|
|||
struct MeshtasticAppleApp: App {
|
||||
|
||||
let persistenceController = PersistenceController.shared
|
||||
|
||||
@ObservedObject private var bleManager: BLEManager = BLEManager.shared
|
||||
@ObservedObject private var userSettings: UserSettings = UserSettings()
|
||||
@Environment(\.scenePhase) var scenePhase
|
||||
|
||||
@State var saveChannels = false
|
||||
@State var incomingUrl: URL?
|
||||
@State var channelSettings: String?
|
||||
|
||||
@Environment(\.scenePhase) var scenePhase
|
||||
|
||||
var body: some Scene {
|
||||
WindowGroup {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue