fix: default values for settings

This commit is contained in:
oSumAtrIX 2022-08-22 19:14:40 +02:00
parent 163a51af57
commit 6f5596f227
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4
3 changed files with 4 additions and 5 deletions

View File

@ -13,7 +13,7 @@ public class HideHomeAdsPatch {
* @param view * @param view
*/ */
public static void HideHomeAds(View view) { public static void HideHomeAds(View view) {
if (!SettingsEnum.HOME_ADS_HIDDEN.getBoolean()) return; if (!SettingsEnum.HOME_ADS_REMOVAL.getBoolean()) return;
AdRemoverAPI.HideViewWithLayout1dp(view); AdRemoverAPI.HideViewWithLayout1dp(view);
} }

View File

@ -1,14 +1,13 @@
package app.revanced.integrations.patches; package app.revanced.integrations.patches;
import app.revanced.integrations.settings.SettingsEnum; import app.revanced.integrations.settings.SettingsEnum;
import app.revanced.integrations.whitelist.Whitelist;
public class VideoAdsPatch { public class VideoAdsPatch {
// Used by app.revanced.patches.youtube.ad.general.video.patch.VideoAdsPatch // Used by app.revanced.patches.youtube.ad.general.video.patch.VideoAdsPatch
// depends on Whitelist patch (still needs to be written) // depends on Whitelist patch (still needs to be written)
public static boolean shouldShowAds() { public static boolean shouldShowAds() {
return !SettingsEnum.VIDEO_ADS_HIDDEN.getBoolean(); // TODO && Whitelist.shouldShowAds(); return !SettingsEnum.VIDEO_ADS_REMOVAL.getBoolean(); // TODO && Whitelist.shouldShowAds();
} }

View File

@ -25,8 +25,8 @@ public enum SettingsEnum {
ENABLE_WHITELIST("revanced_whitelist_ads_enabled", false, ReturnType.BOOLEAN), ENABLE_WHITELIST("revanced_whitelist_ads_enabled", false, ReturnType.BOOLEAN),
//Ad settings //Ad settings
HOME_ADS_HIDDEN("revanced_home_ads_enabled", true, ReturnType.BOOLEAN, true), HOME_ADS_REMOVAL("revanced_home_ads_removal", true, ReturnType.BOOLEAN, true),
VIDEO_ADS_HIDDEN("revanced_video_ads_enabled", 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_AD_REMOVAL("revanced_adremover_ad_removal", true, ReturnType.BOOLEAN, true),
ADREMOVER_MERCHANDISE_REMOVAL("revanced_adremover_merchandise", 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), ADREMOVER_COMMUNITY_POSTS_REMOVAL("revanced_adremover_community_posts_removal", true, ReturnType.BOOLEAN, true),