mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
- Only sort custom drafts if there is something to sort.
This commit is contained in:
@@ -148,6 +148,9 @@ public class BoosterDraft implements IBoosterDraft {
|
||||
case Custom:
|
||||
final List<CustomLimited> myDrafts = loadCustomDrafts();
|
||||
|
||||
if (myDrafts.isEmpty()) {
|
||||
SOptionPane.showMessageDialog("No custom draft files found.");
|
||||
} else {
|
||||
myDrafts.sort(new Comparator<CustomLimited>() {
|
||||
@Override
|
||||
public int compare(CustomLimited o1, CustomLimited o2) {
|
||||
@@ -155,9 +158,6 @@ public class BoosterDraft implements IBoosterDraft {
|
||||
}
|
||||
});
|
||||
|
||||
if (myDrafts.isEmpty()) {
|
||||
SOptionPane.showMessageDialog("No custom draft files found.");
|
||||
} else {
|
||||
final CustomLimited customDraft = SGuiChoose.oneOrNone("Choose Custom Draft", myDrafts);
|
||||
if (customDraft == null) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user