Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -673,28 +673,36 @@ private ThemePackItemCell(ThemePackManagementPage page) {
/// Updates this cell for one installed theme pack.
@Override
protected void updateItem(ThemePackManager.@Nullable InstalledThemePack themePack, boolean empty) {
super.updateItem(themePack, empty);
ThemePackManager.@Nullable InstalledThemePack oldThemePack = getItem();

content.getTags().clear();
iconImage.setImage(null);
iconFallback.setVisible(false);
super.updateItem(themePack, empty);

if (empty || themePack == null) {
setGraphic(null);
return;
}

ThemePackManifest manifest = themePack.manifest();
@Nullable String description = manifest.displayDescription();

if (oldThemePack != themePack) {
content.getTags().clear();

if (themePack.builtin()) {
content.addTag(i18n("theme_pack.builtin"));
}
content.addTag(i18n("theme_pack.version", manifest.version()));
content.addTag(i18n("theme_pack.themes", manifest.themes().size()));

iconImage.setImage(null);
iconFallback.setVisible(false);
page.updateIcon(iconImage, iconFallback, themePack, manifest.icon());
}

setGraphic(graphic);

ThemePackManifest manifest = themePack.manifest();
page.updateIcon(iconImage, iconFallback, themePack, manifest.icon());
content.setTitle(manifest.displayName());
@Nullable String description = manifest.displayDescription();
content.setSubtitle(StringUtils.isBlank(description) ? manifest.id() : description);
Comment thread
KSSJW marked this conversation as resolved.
if (themePack.builtin()) {
content.addTag(i18n("theme_pack.builtin"));
}
content.addTag(i18n("theme_pack.version", manifest.version()));
content.addTag(i18n("theme_pack.themes", manifest.themes().size()));

if (themePack.builtin()) {
right.getChildren().clear();
Expand Down