Skip to content

Commit

Permalink
minor code optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
domax committed Sep 15, 2014
1 parent 1b0f2ff commit 7c1cf55
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,14 @@ public void setError(String error) {
LOG.info("HomeView.setError: error=" + error);
message.setText(error);
main.removeStyleName(style.banner());
main.addStyleName(style.error());
main.setStyleName(style.error(), !isEmpty(error));
}

@Override
public void setBanner(String banner) {
LOG.info("HomeView.setBanner: banner=" + banner);
message.setText(banner);
main.removeStyleName(style.error());
if (isEmpty(banner)) main.removeStyleName(style.banner());
else main.addStyleName(style.banner());
main.setStyleName(style.banner(), !isEmpty(banner));
}
}

0 comments on commit 7c1cf55

Please sign in to comment.