* Fixed broken rarity sorting in card grid (fixes #6508).

This commit is contained in:
LevelX2 2020-06-19 10:54:11 +02:00
parent 57ed834c14
commit f6f5aa0473

View file

@ -15,16 +15,10 @@ public class CardViewRarityComparator implements Comparator<CardView> {
Rarity r1 = o1.getRarity();
Rarity r2 = o2.getRarity();
int val = Integer.compare(
return Integer.compare(
r1 == null ? 0 : r1.getSorting(),
r2 == null ? 0 : r2.getSorting()
);
if (val == 0) {
return o1.getName().compareTo(o2.getName());
} else {
return val;
}
}
}