Commit 4abb653
committed
fix(battery): refactor: improve battery widget robustness and
maintainability
Major refactoring to fix critical bugs, improve code structure, and add
extensibility features while maintaining backward compatibility.
Main fixes:
- Fix division by zero when all batteries have unknown status
- Initialize status variable to prevent nil reference errors
- Remove global batteryType variable to prevent pollution
Several code improvements1 parent 49ae2e4 commit 4abb653
1 file changed
+309
-138
lines changed
0 commit comments