Commit 7c2a7f7f authored by Aleksi Suomalainen's avatar Aleksi Suomalainen

[context] Subscribe to contextproperties only when screen is on.

parent 2976172e
......@@ -49,6 +49,24 @@ Item {
opacity: 0.5
z: 200
}
Connections {
target: lipstickSettings;
onLockscreenVisibleChanged: {
if(lipstickSettings.lockscreenVisible) {
batteryChargePercentage.subscribe()
cellularSignalBars.subscribe()
cellularRegistrationStatus.subscribe()
cellularNetworkName.subscribe()
cellularDataTechnology.subscribe()
} else {
batteryChargePercentage.unsubscribe()
cellularSignalBars.unsubscribe()
cellularRegistrationStatus.unsubscribe()
cellularNetworkName.unsubscribe()
cellularDataTechnology.unsubscribe()
}
}
}
ContextProperty {
id: batteryChargePercentage
......
Markdown is supported
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