Icon+Color must be refreshed when tab changes

This commit is contained in:
baku 2017-02-28 17:44:55 +01:00
parent 1fb2c31e9a
commit dba0b97072

View file

@ -956,12 +956,16 @@ const ContainerService = {
const userContextId = ContainerService._getUserContextIdFromTab(tab);
return ContainerService.getIdentity({userContextId}).then(identity => {
const hbox = viewFor(tab.window).document.getElementById("userContext-icons");
if (!identity) {
hbox.setAttribute("data-identity-color", "");
hbox.hidden = true;
return;
}
const hbox = viewFor(tab.window).document.getElementById("userContext-icons");
hbox.setAttribute("data-identity-color", identity.color);
hbox.hidden = false;
const label = viewFor(tab.window).document.getElementById("userContext-label");
label.setAttribute("value", identity.name);