mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-27 15:14:33 +00:00
Add function to determine if the computer has battery
Also the default value for the "showBatteryIndicator" is the result of the function: if the device is a MacBook it defaults to true like before, otherwise to false
This commit is contained in:
parent
792e9af2b6
commit
712f0e6f88
2 changed files with 9 additions and 1 deletions
|
|
@ -483,7 +483,7 @@ extension Defaults.Keys {
|
|||
|
||||
// MARK: Battery
|
||||
static let showPowerStatusNotifications = Key<Bool>("showPowerStatusNotifications", default: true)
|
||||
static let showBatteryIndicator = Key<Bool>("showBatteryIndicator", default: true)
|
||||
static let showBatteryIndicator = Key<Bool>("showBatteryIndicator", default: BatteryActivityManager.shared.hasBattery())
|
||||
static let showBatteryPercentage = Key<Bool>("showBatteryPercentage", default: true)
|
||||
static let showPowerStatusIcons = Key<Bool>("showPowerStatusIcons", default: true)
|
||||
static let playLowBatteryAlertSound = Key<Bool>("playLowBatteryAlertSound", default: true)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue