Merge branch 'newBranch' into 'master'

Fix path seperator, Fix newdeck editor

See merge request core-developers/forge!2301
This commit is contained in:
Michael Kamensky
2019-11-25 05:27:44 +00:00
2 changed files with 4 additions and 3 deletions

View File

@@ -65,7 +65,7 @@ public class GuiDownloadPicturesLQ extends GuiDownloadService {
final String destPath = ForgeConstants.CACHE_CARD_PICS_DIR + imageKey + ".jpg";
final String setcode2 = StaticData.instance().getEditions().getCode2ByCode(c.getEdition());
String modifier = !imageKey.contains(".full") ? ".fullborder" : "";
final String fullborderPath = ForgeConstants.CACHE_CARD_PICS_DIR + setcode2 + "\\" + TextUtil.fastReplace(imageKey,".full",".fullborder") + modifier + ".jpg";
final String fullborderPath = ForgeConstants.CACHE_CARD_PICS_DIR + setcode2 + ForgeConstants.PATH_SEPARATOR + TextUtil.fastReplace(imageKey,".full",".fullborder") + modifier + ".jpg";
final File existingFB = new File (fullborderPath);
final File existingFB2 = new File (TextUtil.fastReplace(fullborderPath, "1.fullborder", ".fullborder"));

View File

@@ -124,8 +124,9 @@ public final class ItemManagerModel<T extends InventoryItem> {
public void refreshSort() {
if (getOrderedList().isEmpty()) { return; }
Collections.sort(getOrderedList(), new MyComparator());
//fix newdeck editor not loading on Android if a user deleted unwanted sets on edition folder
try { Collections.sort(getOrderedList(), new MyComparator()); }
catch (IllegalArgumentException ex) {}
}
//Manages sorting orders for multiple depths of sorting