Remove some unnecessary code

This commit is contained in:
Jakub Valtar
2017-01-21 05:21:05 +01:00
parent 6782337913
commit c31c5f3ec6
2 changed files with 9 additions and 13 deletions
@@ -378,7 +378,7 @@ implements Scrollable, ContributionListing.ChangeListener {
}
String authorList = contribution.getAuthorList();
String name = getAuthorNameWithoutMarkup(authorList);
label.setText(name.toString());
label.setText(name);
label.setHorizontalAlignment(SwingConstants.LEFT);
if(!contribution.isCompatible(Base.getRevision())){
label.setForeground(Color.LIGHT_GRAY);
@@ -454,12 +454,10 @@ implements Scrollable, ContributionListing.ChangeListener {
new DetailPanel(ListPanel.this);
panelByContribution.put(contribution, newPanel);
visibleContributions.add(contribution);
if (newPanel != null) {
newPanel.setContribution(contribution);
add(newPanel);
updatePanelOrdering(visibleContributions);
updateColors(); // XXX this is the place
}
newPanel.setContribution(contribution);
add(newPanel);
updatePanelOrdering(visibleContributions);
updateColors(); // XXX this is the place
}
}
}
@@ -233,12 +233,10 @@ public class UpdateListPanel extends ListPanel {
panelByContribution.put(contribution, newPanel);
}
visibleContributions.add(contribution);
if (newPanel != null) {
newPanel.setContribution(contribution);
add(newPanel);
updatePanelOrdering(panelByContribution.keySet());
updateColors(); // XXX this is the place
}
newPanel.setContribution(contribution);
add(newPanel);
updatePanelOrdering(panelByContribution.keySet());
updateColors(); // XXX this is the place
}
}