Skip to content

Commit

Permalink
Merge pull request #244 from ftp27/bug-fix/220-battery-icon-update
Browse files Browse the repository at this point in the history
fixed #220 Battery icon not showing the current charge of battery
  • Loading branch information
D0miH committed Dec 27, 2020
2 parents 388cdb1 + dc9f3c5 commit 33096b5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ class BatteryMenuBarItem: MenuBarItem {
batteryIcon = NSImage(named: "BatteryIconCharging")
} else if !isCharging && !isOnAC || !isOnAC && isCharging {
// the case !isOnAC && isCharging occurs when the machine is unplugged from AC and the remaining time is still calculated
guard var iconTemplate = NSImage(named: "BatteryIcon") else {
guard var iconTemplate = NSImage(named: "BatteryIcon")?.copy() as? NSImage else {
DDLogError("Failed to load the battery template icon (battery state: \(batteryState)")
return nil
}
Expand Down

0 comments on commit 33096b5

Please sign in to comment.