PowerProfileService: don't show toast on non valid power profile

This commit is contained in:
Ly-sec 2025-09-09 18:15:44 +02:00
parent 1f0be929d7
commit 5dc4ba504c

View file

@ -52,7 +52,11 @@ Singleton {
target: powerProfiles
function onProfileChanged() {
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)
}
}
}
}