mirror of
https://github.com/correl/mage.git
synced 2025-01-11 19:13:02 +00:00
* Fixed broken rarity sorting in card grid (fixes #6508).
This commit is contained in:
parent
57ed834c14
commit
f6f5aa0473
1 changed files with 1 additions and 7 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue