add Preload Custom Drafts

Should fix longer startup time on mobile version instead of forcing to load custom drafts file at startup.
This commit is contained in:
Anthony Calosa
2025-08-15 08:45:21 +08:00
parent be5c7cfd04
commit e2cc52fd02
11 changed files with 31 additions and 9 deletions

View File

@@ -283,7 +283,8 @@ public class Forge implements ApplicationListener {
private void preloadBoosterDrafts() {
//preloading of custom drafts
BoosterDraft.initializeCustomDrafts();
if (getForgePreferences().getPrefBoolean(FPref.PRELOAD_CUSTOM_DRAFTS))
BoosterDraft.initializeCustomDrafts();
}
public static void openHomeScreen(int index, FScreen lastMatch) {

View File

@@ -393,6 +393,10 @@ public class SettingsPage extends TabPage<SettingsScreen> {
Forge.getLocalizer().getMessage("cbLoadArchivedFormats"),
Forge.getLocalizer().getMessage("nlLoadArchivedFormats")),
3);
lstSettings.addItem(new BooleanSetting(FPref.PRELOAD_CUSTOM_DRAFTS,
Forge.getLocalizer().getMessage("cbPreloadCustomDrafts"),
Forge.getLocalizer().getMessage("nlPreloadCustomDrafts")),
3);
lstSettings.addItem(new BooleanSetting(FPref.UI_LOAD_UNKNOWN_CARDS,
Forge.getLocalizer().getMessage("lblEnableUnknownCards"),
Forge.getLocalizer().getMessage("nlEnableUnknownCards")) {