Commit 14d41c0c authored by Nate Graham's avatar Nate Graham
Browse files

[applets/batterymonitor] Simplify condition

parent ee77ecd7
......@@ -62,8 +62,8 @@ ColumnLayout {
// isn't enabled anyway
visible: inhibitions.length === 1 && !powerManagement.disabled
Layout.fillWidth: true
iconSource: inhibitions.length === 1 ? inhibitions[0].Icon : ""
text: inhibitions.length === 1 ?
iconSource: visible ? inhibitions[0].Icon : ""
text: visible ?
inhibitions[0].Reason ?
i18n("%1 is inhibiting sleep and screen locking (%2)", inhibitions[0].Name, inhibitions[0].Reason)
:
......
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