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

Unified Diff: ui/login/account_picker/user_pod_row.js

Issue 2548703002: cros: Smart unlock set-up had space for icon while none is show. (Closed)
Patch Set: Created 4 years 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/login/account_picker/user_pod_row.js
diff --git a/ui/login/account_picker/user_pod_row.js b/ui/login/account_picker/user_pod_row.js
index 71e88f292fade6756b7ce5bcca209238bf3dcd79..4d11b857d20a218cf39ee456f3dae7f5758632c5 100644
--- a/ui/login/account_picker/user_pod_row.js
+++ b/ui/login/account_picker/user_pod_row.js
@@ -374,7 +374,12 @@ cr.define('login', function() {
* Shows the icon.
*/
show: function() {
- this.hidden = false;
+ // Show the icon if the current iconId is valid.
+ var validIcon = false;
+ UserPodCustomIcon.ICONS.forEach(function(icon) {
+ validIcon = validIcon || this.iconId_ == icon.id;
+ }, this);
+ this.hidden = validIcon ? false : true;
},
/**
« 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