Commit 861cf56d authored by dpapad's avatar dpapad Committed by Commit Bot

ChromeOS Settings: Fix bluetooth icon updating.

There is a race condition between when Polymer calls observers and when it
updates a two-way bound variable in the parent element.

Bypass the isuse by using the observers parameter instead.

Bug: 896509
Change-Id: I63b13c858b62214d7973af641f67c659de9ea674
Reviewed-on: https://chromium-review.googlesource.com/c/1289410Reviewed-by: default avatarGiovanni Ortuño Urquidi <ortuno@chromium.org>
Commit-Queue: Demetrios Papadopoulos <dpapad@chromium.org>
Cr-Commit-Position: refs/heads/master@{#600951}
parent ec03f720
......@@ -162,11 +162,14 @@ Polymer({
},
/**
* @param {boolean} bluetoothToggleState
* @return {string}
* @private
*/
getIcon_: function() {
if (!this.bluetoothToggleState_)
getIcon_: function(bluetoothToggleState) {
// Don't use |this.bluetoothToggleState_| here, since it has not been
// updated yet to the latest value.
if (!bluetoothToggleState)
return 'settings:bluetooth-disabled';
return 'cr:bluetooth';
},
......
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