mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-06-14 22:55:12 +10:00
Fix battery voltage null check in RepeaterStatusScreen
This commit is contained in:
@@ -605,8 +605,9 @@ class _RepeaterStatusScreenState extends State<RepeaterStatusScreen> {
|
||||
final batteryMv =
|
||||
connector.getRepeaterBatteryMillivolts(widget.repeater.publicKeyHex) ??
|
||||
_batteryMv;
|
||||
if (batteryMv == null)
|
||||
if (batteryMv == null) {
|
||||
return Theme.of(context).colorScheme.onSurfaceVariant;
|
||||
}
|
||||
final percent = estimateBatteryPercentFromMillivolts(
|
||||
batteryMv,
|
||||
_batteryChemistry(),
|
||||
|
||||
Reference in New Issue
Block a user