From 6f5596f2271a03b5fe09e045cd69fc94404d2fa1 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Mon, 22 Aug 2022 19:14:40 +0200 Subject: [PATCH] fix: default values for settings --- .../app/revanced/integrations/patches/HideHomeAdsPatch.java | 2 +- .../java/app/revanced/integrations/patches/VideoAdsPatch.java | 3 +-- .../java/app/revanced/integrations/settings/SettingsEnum.java | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/app/revanced/integrations/patches/HideHomeAdsPatch.java b/app/src/main/java/app/revanced/integrations/patches/HideHomeAdsPatch.java index 4ed41f70..411bcb6c 100644 --- a/app/src/main/java/app/revanced/integrations/patches/HideHomeAdsPatch.java +++ b/app/src/main/java/app/revanced/integrations/patches/HideHomeAdsPatch.java @@ -13,7 +13,7 @@ public class HideHomeAdsPatch { * @param view */ public static void HideHomeAds(View view) { - if (!SettingsEnum.HOME_ADS_HIDDEN.getBoolean()) return; + if (!SettingsEnum.HOME_ADS_REMOVAL.getBoolean()) return; AdRemoverAPI.HideViewWithLayout1dp(view); } diff --git a/app/src/main/java/app/revanced/integrations/patches/VideoAdsPatch.java b/app/src/main/java/app/revanced/integrations/patches/VideoAdsPatch.java index cdaf6dfc..076fcae7 100644 --- a/app/src/main/java/app/revanced/integrations/patches/VideoAdsPatch.java +++ b/app/src/main/java/app/revanced/integrations/patches/VideoAdsPatch.java @@ -1,14 +1,13 @@ package app.revanced.integrations.patches; import app.revanced.integrations.settings.SettingsEnum; -import app.revanced.integrations.whitelist.Whitelist; public class VideoAdsPatch { // Used by app.revanced.patches.youtube.ad.general.video.patch.VideoAdsPatch // depends on Whitelist patch (still needs to be written) public static boolean shouldShowAds() { - return !SettingsEnum.VIDEO_ADS_HIDDEN.getBoolean(); // TODO && Whitelist.shouldShowAds(); + return !SettingsEnum.VIDEO_ADS_REMOVAL.getBoolean(); // TODO && Whitelist.shouldShowAds(); } diff --git a/app/src/main/java/app/revanced/integrations/settings/SettingsEnum.java b/app/src/main/java/app/revanced/integrations/settings/SettingsEnum.java index 5ff3e044..fa872883 100644 --- a/app/src/main/java/app/revanced/integrations/settings/SettingsEnum.java +++ b/app/src/main/java/app/revanced/integrations/settings/SettingsEnum.java @@ -25,8 +25,8 @@ public enum SettingsEnum { ENABLE_WHITELIST("revanced_whitelist_ads_enabled", false, ReturnType.BOOLEAN), //Ad settings - HOME_ADS_HIDDEN("revanced_home_ads_enabled", true, ReturnType.BOOLEAN, true), - VIDEO_ADS_HIDDEN("revanced_video_ads_enabled", true, ReturnType.BOOLEAN, true), + HOME_ADS_REMOVAL("revanced_home_ads_removal", true, ReturnType.BOOLEAN, true), + VIDEO_ADS_REMOVAL("revanced_video_ads_removal", true, ReturnType.BOOLEAN, true), ADREMOVER_AD_REMOVAL("revanced_adremover_ad_removal", true, ReturnType.BOOLEAN, true), ADREMOVER_MERCHANDISE_REMOVAL("revanced_adremover_merchandise", true, ReturnType.BOOLEAN, true), ADREMOVER_COMMUNITY_POSTS_REMOVAL("revanced_adremover_community_posts_removal", true, ReturnType.BOOLEAN, true),