Add Disable Card Images Option

This commit is contained in:
Anthony Calosa
2021-03-04 02:15:16 +08:00
parent 083c34acc5
commit 17944c0e41
14 changed files with 53 additions and 0 deletions

View File

@@ -81,6 +81,7 @@ public class ForgePreferences extends PreferencesStore<ForgePreferences.FPref> {
UI_OVERLAY_CARD_ID ("true"),
UI_OVERLAY_ABILITY_ICONS("true"),
UI_ENABLE_ONLINE_IMAGE_FETCHER ("false"),
UI_DISABLE_CARD_IMAGES ("false"),
UI_IMAGE_CACHE_MAXIMUM("400"),
UI_OVERLAY_FOIL_EFFECT ("true"),
UI_HIDE_REMINDER_TEXT ("false"),

View File

@@ -43,6 +43,9 @@ public abstract class ImageFetcher {
public void fetchImage(final String imageKey, final Callback callback) {
FThreads.assertExecutedByEdt(true);
if (FModel.getPreferences().getPrefBoolean(ForgePreferences.FPref.UI_DISABLE_CARD_IMAGES))
return;
if (!FModel.getPreferences().getPrefBoolean(ForgePreferences.FPref.UI_ENABLE_ONLINE_IMAGE_FETCHER))
return;