force the tinter to refresh when we change theme

This commit is contained in:
Matthew Hodgson 2017-11-14 15:27:28 +00:00
parent 8c218557df
commit 805796e4e0

View file

@ -101,6 +101,9 @@ class Tinter {
// the currently loaded theme (if any)
this.theme = undefined;
// whether to force a tint (e.g. after changing theme)
this.forceTint = false;
}
/**
@ -153,12 +156,15 @@ class Tinter {
tertiaryColor = rgbToHex(rgb1);
}
if (this.colors[0] === primaryColor &&
if (this.forceTint == false &&
this.colors[0] === primaryColor &&
this.colors[1] === secondaryColor &&
this.colors[2] === tertiaryColor) {
return;
}
this.forceTint = false;
this.colors[0] = primaryColor;
this.colors[1] = secondaryColor;
this.colors[2] = tertiaryColor;
@ -204,6 +210,7 @@ class Tinter {
}
this.calcCssFixups();
this.forceTint = true;
}
calcCssFixups() {