mirror of
https://github.com/meshtastic/Meshtastic-Apple.git
synced 2026-04-20 22:13:56 +00:00
Use let instead of nil check for connect battery icon
This commit is contained in:
parent
37a37c584b
commit
795c8a8edd
1 changed files with 2 additions and 2 deletions
|
|
@ -44,8 +44,8 @@ struct Connect: View {
|
|||
VStack(alignment: .center) {
|
||||
CircleText(text: node?.user?.shortName?.addingVariationSelectors ?? "?", color: Color(UIColor(hex: UInt32(node?.num ?? 0))), circleSize: 90)
|
||||
.padding(.trailing, 5)
|
||||
if node?.latestDeviceMetrics != nil {
|
||||
BatteryCompact(batteryLevel: node?.latestDeviceMetrics?.batteryLevel ?? 0, font: .caption, iconFont: .callout, color: .accentColor)
|
||||
if let metrics = node?.latestDeviceMetrics {
|
||||
BatteryCompact(batteryLevel: metrics.batteryLevel, font: .caption, iconFont: .callout, color: .accentColor)
|
||||
.padding(.trailing, 5)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue