mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 21:42:51 -05:00
osd: try to optimize power profile osd more
This commit is contained in:
@@ -12,22 +12,19 @@ DankOSD {
|
||||
autoHideInterval: 2000
|
||||
enableMouseInteraction: false
|
||||
|
||||
property int lastProfile: -1
|
||||
|
||||
Connections {
|
||||
target: typeof PowerProfiles !== "undefined" ? PowerProfiles : null
|
||||
target: BatteryService
|
||||
|
||||
function onProfileChanged() {
|
||||
if (lastProfile !== -1 && lastProfile !== PowerProfiles.profile && SettingsData.osdPowerProfileEnabled) {
|
||||
function onPowerProfileChanged() {
|
||||
if (SettingsData.osdPowerProfileEnabled) {
|
||||
root.show()
|
||||
}
|
||||
lastProfile = PowerProfiles.profile
|
||||
}
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
if (typeof PowerProfiles !== "undefined") {
|
||||
lastProfile = PowerProfiles.profile
|
||||
if (SettingsData.osdPowerProfileEnabled) {
|
||||
root.show()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user