Commit ee77ecd7 authored by Ömer Fadıl Usta's avatar Ömer Fadıl Usta 😊 Committed by Nate Graham
Browse files

[applets/batterymonitor/package/contents/ui/PowerManagementItem] Fix trying to...

[applets/batterymonitor/package/contents/ui/PowerManagementItem] Fix trying to reach undefined object's value
parent 47d7172e
......@@ -62,10 +62,14 @@ ColumnLayout {
// isn't enabled anyway
visible: inhibitions.length === 1 && !powerManagement.disabled
Layout.fillWidth: true
iconSource: inhibitions[0].Icon || ""
text: inhibitions[0].Reason ?
i18n("%1 is inhibiting sleep and screen locking (%2)", inhibitions[0].Name, inhibitions[0].Reason)
: i18n("%1 is inhibiting sleep and screen locking (unknown reason)", inhibitions[0].Name)
iconSource: inhibitions.length === 1 ? inhibitions[0].Icon : ""
text: inhibitions.length === 1 ?
inhibitions[0].Reason ?
i18n("%1 is inhibiting sleep and screen locking (%2)", inhibitions[0].Name, inhibitions[0].Reason)
:
i18n("%1 is inhibiting sleep and screen locking (unknown reason)", inhibitions[0].Name)
:
""
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment