settings: bluetooth: fix power button issue 99/19599/1
authorMatt Ranostay <matt.ranostay@konsulko.com>
Tue, 15 Jan 2019 03:04:00 +0000 (19:04 -0800)
committerMatt Ranostay <matt.ranostay@konsulko.com>
Tue, 15 Jan 2019 03:39:08 +0000 (03:39 +0000)
Responding to both checkbox clicks and power events will cause
an infinite loop in some cases of toggling power state.

Bug-AGL: SPEC-2004
Change-Id: I4fb841661472f875a978a5bd314157cfff07328b
Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
app/bluetooth/Bluetooth.qml

index 8eb7cd6..32577bf 100644 (file)
@@ -101,9 +101,7 @@ SettingPage {
             }
         }
 
-        onPowerChanged: {
-            root.checked = state
-        }
+        Component.onCompleted: root.checked = bluetooth.power
     }
 
     Text {