mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
b03ef7fa17
commit
5168e7f1bf
1 changed files with 5 additions and 1 deletions
|
|
@ -1250,7 +1250,11 @@ class BLEManager: NSObject, CBPeripheralDelegate, MqttClientProxyManagerDelegate
|
|||
} else {
|
||||
Logger.data.warning("⚠️ connectedPeripheral is nil while attempting to log auto-favoriting a node.")
|
||||
}
|
||||
_ = self.setFavoriteNode(node: (newMessage.toUser?.userNode)!, connectedNodeNum: fromUserNum)
|
||||
guard let userNode = newMessage.toUser?.userNode else {
|
||||
Logger.data.warning("⚠️ Unable to set favorite node: userNode is nil.")
|
||||
return
|
||||
}
|
||||
_ = self.setFavoriteNode(node: userNode, connectedNodeNum: fromUserNum)
|
||||
} catch {
|
||||
context.rollback()
|
||||
let nsError = error as NSError
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue