on xenial help sign in
Fix type errors
commit3d6236ec40fbde9041ba8654448a2571cde25812 authorRodney Dawes <dobey@ubports.com> dateThu 6 Aug 2020, 16:59 (6 years ago) parent69f525b
2 files changed+3−3
qml/Panel/Indicators/IndicatorsLight.qml+2−2 qml/Shell.qml+1−1
qml/Panel/Indicators/IndicatorsLight.qml+2−2
@@ -204,11 +204,11 @@ console.log("no support for Multicolor LED. " + indicatorState)
204204 property variant deviceState: action("device-state").state
205205 Component.onCompleted: start()
206206 onBatteryLevelChanged: {
207− root.batteryLevel = batteryLevel
207+ root.batteryLevel = batteryLevel ? batteryLevel : 0.00
208208 updateLightState("onBatteryLevelChanged")
209209 }
210210 onDeviceStateChanged: {
211− root.deviceState = deviceState
211+ root.deviceState = deviceState ? deviceState : "unknown"
212212 updateLightState("onDeviceStateChanged")
213213 }
214214 }
qml/Shell.qml+1−1
@@ -90,7 +90,7 @@ StyledItem {
9090 } else if (showingGreeter || notifications.topmostIsFullscreen) {
9191 return Qt.PrimaryOrientation;
9292 } else {
93− return shell.orientations.map(stage.supportedOrientations);
93+ return shell.orientations ? shell.orientations.map(stage.supportedOrientations) : Qt.PrimaryOrientation;
9494 }
9595 }
9696