PowerProfileService: don't show toast on non valid power profile
This commit is contained in:
parent
1f0be929d7
commit
5dc4ba504c
1 changed files with 5 additions and 1 deletions
|
|
@ -52,7 +52,11 @@ Singleton {
|
||||||
target: powerProfiles
|
target: powerProfiles
|
||||||
function onProfileChanged() {
|
function onProfileChanged() {
|
||||||
root.profile = powerProfiles.profile
|
root.profile = powerProfiles.profile
|
||||||
ToastService.showNotice("Power Profile", root.profileName())
|
// Only show toast if we have a valid profile name (not "Unknown")
|
||||||
|
const profileName = root.profileName()
|
||||||
|
if (profileName !== "Unknown") {
|
||||||
|
ToastService.showNotice("Power Profile", profileName)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue