mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-28 15:44:32 +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
4f36b69abf
commit
acb6cd8470
2 changed files with 9 additions and 1 deletions
|
|
@ -479,7 +479,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