Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(371)

Unified Diff: ui/webui/resources/cr_elements/network/cr_network_list_item.js

Issue 2369833003: Settings/Oobe: Fix logic for network list item connecting text. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/webui/resources/cr_elements/network/cr_network_list_item.js
diff --git a/ui/webui/resources/cr_elements/network/cr_network_list_item.js b/ui/webui/resources/cr_elements/network/cr_network_list_item.js
index fa42f019d587fe7d7f681aada891bb60db70f60d..08af24e20ec7de53df78f050fab5e40b40741cd2 100644
--- a/ui/webui/resources/cr_elements/network/cr_network_list_item.js
+++ b/ui/webui/resources/cr_elements/network/cr_network_list_item.js
@@ -113,8 +113,11 @@ Polymer({
if (!this.isStateTextVisible_())
return '';
let network = this.networkState;
- if (this.isListItem)
- return this.i18n('networkListItemConnected');
+ if (this.isListItem) {
+ if (this.isConnected_())
+ return this.i18n('networkListItemConnected');
+ return '';
+ }
if (network.Name && network.ConnectionState) {
return this.getConnectionStateText_(
network.ConnectionState, CrOnc.getNetworkName(network, this));
@@ -149,8 +152,7 @@ Polymer({
/** @private */
isConnected_: function() {
return this.networkState &&
- this.networkState.ConnectionState !=
- CrOnc.ConnectionState.NOT_CONNECTED;
+ this.networkState.ConnectionState == CrOnc.ConnectionState.CONNECTED;
},
/**
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698