> otherwise we risk showing inconsistent states in each place if.
I'd be interested in how that sentence continues :-p
Joking aside, I don't think this is correct. As far as I can see, "nConnectedDevices == -1" means there is no Bluetooth adapter that is powered on - we can toggle the AirplaneMode property as much as we want (that's what "Turn On/Off" does after all), that's not going to change. So a better option may be to do
Review of attachment 361761:
> otherwise we risk showing inconsistent states in each place if.
I'd be interested in how that sentence continues :-p
Joking aside, I don't think this is correct. As far as I can see, "nConnectedDevices == -1" means there is no Bluetooth adapter that is powered on - we can toggle the AirplaneMode property as much as we want (that's what "Turn On/Off" does after all), that's not going to change. So a better option may be to do
this. _toggleItem. actor.visible = nConnectedDevices > -1;
instead ...
::: js/ui/status/ bluetooth. js
@@ +134,3 @@
+ // Bluetooth will be considered 'Off' if either the adapter
+ // is not available or it's set in irplane mode.
*airplane