mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
Merge branch 'patch-4' into 'master'
Fix slowness when removing a card from a deck by only getting the key once instead of twice. See merge request core-developers/forge!77
This commit is contained in:
@@ -68,7 +68,7 @@ public enum ColumnDef {
|
||||
new Function<Entry<InventoryItem, Integer>, Comparable<?>>() {
|
||||
@Override
|
||||
public Comparable<?> apply(final Entry<InventoryItem, Integer> from) {
|
||||
return toCollectorPrefix(from.getKey()) + " " + toSortableName(from.getKey().getName());
|
||||
return toCollectorPrefix(from.getKey());
|
||||
}
|
||||
},
|
||||
new Function<Entry<? extends InventoryItem, Integer>, Object>() {
|
||||
@@ -520,7 +520,7 @@ public enum ColumnDef {
|
||||
//this is a multi-layer sort. coding it in layers to make it easier to manipulate.
|
||||
private static String toCollectorPrefix(final InventoryItem i) {
|
||||
//make sure it's a card. if not, pointless to proceed.
|
||||
return i instanceof PaperCard ? toBasicLandsLast(i) : "";
|
||||
return (i instanceof PaperCard ? ((IPaperCard) i).getCollectorIndex() + " ": "") + toSortableName(i.getName());
|
||||
}
|
||||
|
||||
//lands after other cards
|
||||
|
||||
Reference in New Issue
Block a user