Fix clearing themes

Setting the theme to null for some reason worked in GWT hosted mode
but not when compiled. Fix both the broken call site and the method
itself.

Change-Id: Ib87c9b02e551c39768dddf0e3feb5dae849e585a
This commit is contained in:
Dave Borowitz
2013-05-13 17:06:04 -07:00
parent b95d35bcd7
commit a6678bff25
2 changed files with 9 additions and 5 deletions

View File

@@ -45,13 +45,17 @@ public class Themer {
}
public void set(ThemeInfo theme) {
if (theme != null) {
set(theme.css() != null ? theme.css() : cssText,
theme.header() != null ? theme.header() : headerHtml,
theme.footer() != null ? theme.footer() : footerHtml);
} else {
set(cssText, headerHtml, footerHtml);
}
}
public void clear() {
set(cssText, headerHtml, footerHtml);
set(null);
}
void init(Element css, Element header, Element footer) {

View File

@@ -62,7 +62,7 @@ public abstract class Screen extends View {
protected void onUnload() {
super.onUnload();
if (setTheme) {
Gerrit.THEMER.set(null);
Gerrit.THEMER.clear();
}
}