Commit 60b1c98f authored by Michael Checo's avatar Michael Checo Committed by Chromium LUCI CQ

Diagnostics: Wait for system info before showing app

- This change is needed to keep the order of the cards consistent since
  the battery status card is initially hidden.

Bug: 1125150
Test: browser_tests --gtest_filter=DiagnosticsApp*
Change-Id: Iaec2a4d37a11b083eb245f989ad9c937fb185c23
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2612152Reviewed-by: default avatarZentaro Kavanagh <zentaro@chromium.org>
Commit-Queue: Michael Checo <michaelcheco@google.com>
Cr-Commit-Position: refs/heads/master@{#842573}
parent e308fad9
......@@ -43,7 +43,7 @@
padding: 5px;
}
</style>
<div id="diagnosticsContainer">
<div id="diagnosticsContainer" hidden="[[!systemInfoReceived_]]">
<div id="header">[[i18n('diagnosticsTitle')]]</div>
<div class="overview-container">
<overview-card id="overviewCard"></overview-card>
......
......@@ -46,6 +46,12 @@ Polymer({
type: Boolean,
value: false,
},
/** @type {boolean} */
systemInfoReceived_: {
type: Boolean,
value: false,
},
},
/** @override */
......@@ -66,6 +72,7 @@ Polymer({
* @private
*/
onSystemInfoReceived_(systemInfo) {
this.systemInfoReceived_ = true;
this.showBatteryStatusCard_ = systemInfo.deviceCapabilities.hasBattery;
},
......
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