Skip to content

Commit

Permalink
Fix a bug regarding battery
Browse files Browse the repository at this point in the history
  • Loading branch information
Dlurak committed May 25, 2024
1 parent 00b1f7b commit d867f82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/system/battery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ impl BatteryInformation {
.state_of_charge()
.get::<battery::units::ratio::percent>() as u8;

let is_charging = battery.state() == State::Charging;
let is_charging = battery.state() != State::Discharging;

Ok(Self {
percentages,
Expand Down

0 comments on commit d867f82

Please sign in to comment.