Object.seal(this);
// Initialize the header.
- this.updateProfileBatch();
+ this.updateProfileBadge();
this.element_.querySelector('#app-name').innerText =
chrome.runtime.getManifest().name;
};
/**
- * Updates visibility and image of the profile batch.
+ * Updates visibility and image of the profile badge.
*/
-FileManagerUI.prototype.updateProfileBatch = function() {
+FileManagerUI.prototype.updateProfileBadge = function() {
if (this.dialogType_ !== DialogType.FULL_PAGE)
return;
var imageUri;
if (currentId !== displayedId) {
for (var i = 0; i < profiles.length; i++) {
- if (profiles[i].profileId !== currentId) {
+ if (profiles[i].profileId === currentId) {
imageUri = profiles[i].imageUri;
break;
}
}
}
- var profileBatch = this.element_.querySelector('#profile-batch');
+ var profileBadge = this.element_.querySelector('#profile-badge');
if (imageUri)
- profileBatch.setAttribute('src', imageUri);
+ profileBadge.setAttribute('src', imageUri);
else
- profileBatch.removeAttribute('src');
+ profileBadge.removeAttribute('src');
}.bind(this));
};