From 932c31c2b8f9de97cf6fe1187c2c5e4589e0c38a Mon Sep 17 00:00:00 2001 From: James Rich <2199651+jamesarich@users.noreply.github.com> Date: Tue, 20 Jan 2026 21:41:49 -0600 Subject: [PATCH] fix(ui): Hide battery icon when no power data is available (#4274) Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com> --- .../meshtastic/feature/node/component/NodeItem.kt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/feature/node/src/main/kotlin/org/meshtastic/feature/node/component/NodeItem.kt b/feature/node/src/main/kotlin/org/meshtastic/feature/node/component/NodeItem.kt index 551153aa4..43e052b18 100644 --- a/feature/node/src/main/kotlin/org/meshtastic/feature/node/component/NodeItem.kt +++ b/feature/node/src/main/kotlin/org/meshtastic/feature/node/component/NodeItem.kt @@ -153,11 +153,13 @@ fun NodeItem( horizontalArrangement = Arrangement.SpaceBetween, verticalAlignment = Alignment.CenterVertically, ) { - MaterialBatteryInfo( - level = thatNode.batteryLevel, - voltage = thatNode.voltage, - contentColor = contentColor, - ) + if (thatNode.batteryLevel > 0 || thatNode.voltage > 0f) { + MaterialBatteryInfo( + level = thatNode.batteryLevel, + voltage = thatNode.voltage, + contentColor = contentColor, + ) + } Row( horizontalArrangement = Arrangement.spacedBy(8.dp), verticalAlignment = Alignment.CenterVertically,