Commit 3915bb6d authored by Jon Mann's avatar Jon Mann Committed by Commit Bot

Remove "Mobile Data" section from quick settings when not available.

When a cellular dongle is removed and quick settings is already opened
the now empty "Mobile Data" section was previously shifting to the
bottom instead of being removed.

Bug: 812337
Change-Id: I5082e383220e7c6bb66a34e2435425cbf4dbdd20
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1670412Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Commit-Queue: Jon Mann <jonmann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#671378}
parent 6622fe15
......@@ -259,6 +259,11 @@ NetworkListView::UpdateNetworkListEntries() {
++index;
index += new_cellular_guids->size();
new_guids->insert(new_cellular_guids->begin(), new_cellular_guids->end());
} else if (mobile_header_view_) {
scroll_content()->RemoveChildView(mobile_header_view_);
delete mobile_header_view_;
mobile_header_view_ = nullptr;
needs_relayout_ = true;
}
if (!wifi_header_view_)
......
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