diff --git a/app/src/main/java/app/revanced/integrations/shared/settings/BaseSettings.java b/app/src/main/java/app/revanced/integrations/shared/settings/BaseSettings.java index c0dc28dd7..a3d14a7cd 100644 --- a/app/src/main/java/app/revanced/integrations/shared/settings/BaseSettings.java +++ b/app/src/main/java/app/revanced/integrations/shared/settings/BaseSettings.java @@ -24,6 +24,7 @@ public class BaseSettings { */ public static final BooleanSetting HIDE_FULLSCREEN_ADS = new BooleanSetting("revanced_hide_fullscreen_ads", TRUE, true); public static final BooleanSetting HIDE_FULLSCREEN_ADS_TYPE = new BooleanSetting("revanced_hide_fullscreen_ads_type", TRUE, true); + public static final BooleanSetting HIDE_PROMOTION_ALERT_BANNER = new BooleanSetting("revanced_hide_promotion_alert_banner", TRUE); public static final BooleanSetting HIDE_SETTINGS_MENU = new BooleanSetting("revanced_hide_settings_menu", FALSE); public static final StringSetting HIDE_SETTINGS_MENU_FILTER_STRINGS = new StringSetting("revanced_hide_settings_menu_filter_strings", "", true); diff --git a/app/src/main/java/app/revanced/integrations/youtube/patches/components/AdsFilter.java b/app/src/main/java/app/revanced/integrations/youtube/patches/components/AdsFilter.java index 2f31796e2..ed9fa42f7 100644 --- a/app/src/main/java/app/revanced/integrations/youtube/patches/components/AdsFilter.java +++ b/app/src/main/java/app/revanced/integrations/youtube/patches/components/AdsFilter.java @@ -9,11 +9,18 @@ public final class AdsFilter extends Filter { public AdsFilter() { + final StringFilterGroup alertBannerPromo = new StringFilterGroup( + Settings.HIDE_PROMOTION_ALERT_BANNER, + "alert_banner_promo.eml" + ); + final StringFilterGroup carouselAd = new StringFilterGroup( Settings.HIDE_GENERAL_ADS, "carousel_ad" ); + addIdentifierCallbacks(alertBannerPromo, carouselAd); + final StringFilterGroup merchandise = new StringFilterGroup( Settings.HIDE_MERCHANDISE_SHELF, "product_carousel", @@ -78,7 +85,5 @@ public AdsFilter() { viewProducts, webSearchPanel ); - - addIdentifierCallbacks(carouselAd); } }