Commit 7715f2bf authored by Sammie Quon's avatar Sammie Quon Committed by Commit Bot

tray: Update network list to show nothing after toggle wifi on and off.

The wifi disabled message would show on toggle wifi off, but remain
when toggling wifi back on.

Test: manual
Bug: 823236
Change-Id: Ib232a917e45fea83a72792d0fbf30374661477d2
Reviewed-on: https://chromium-review.googlesource.com/1102896Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Reviewed-by: default avatarXiaoyin Hu <xiaoyinh@chromium.org>
Commit-Queue: Sammie Quon <sammiequon@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567801}
parent 7e79d960
......@@ -703,10 +703,12 @@ NetworkListView::UpdateNetworkListEntries() {
return new_guids;
}
bool should_clear_info_label = true;
if (!handler->FirstNetworkByType(NetworkTypePattern::WiFi())) {
UpdateInfoLabel(IDS_ASH_STATUS_TRAY_NETWORK_WIFI_ENABLED, index,
&no_wifi_networks_view_);
++index;
should_clear_info_label = false;
}
// Add Wi-Fi networks.
......@@ -719,6 +721,9 @@ NetworkListView::UpdateNetworkListEntries() {
if (index == 0) {
UpdateInfoLabel(IDS_ASH_STATUS_TRAY_NO_NETWORKS, index,
&no_wifi_networks_view_);
} else if (should_clear_info_label) {
// Update the label to show nothing.
UpdateInfoLabel(0, index, &no_wifi_networks_view_);
}
return new_guids;
......
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