mirror of
https://github.com/revanced/revanced-integrations.git
synced 2024-12-03 01:02:55 +01:00
feat: app promo banner removal setting
This commit is contained in:
parent
4f419dd915
commit
30724583e3
@ -34,6 +34,10 @@ public class LithoAdRemoval {
|
|||||||
return SharedPrefs.getBoolean(Objects.requireNonNull(YouTubeTikTokRoot_Application.getAppContext()), "experimental_compact_banner", false);
|
return SharedPrefs.getBoolean(Objects.requireNonNull(YouTubeTikTokRoot_Application.getAppContext()), "experimental_compact_banner", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean isExperimentalAppPromoBannerRemoval() {
|
||||||
|
return SharedPrefs.getBoolean(Objects.requireNonNull(YouTubeTikTokRoot_Application.getAppContext()), "experimental_app_promo_banner", false);
|
||||||
|
}
|
||||||
|
|
||||||
public static boolean isExperimentalCommentsRemoval() {
|
public static boolean isExperimentalCommentsRemoval() {
|
||||||
return SharedPrefs.getBoolean(Objects.requireNonNull(YouTubeTikTokRoot_Application.getAppContext()), "experimental_comments", false);
|
return SharedPrefs.getBoolean(Objects.requireNonNull(YouTubeTikTokRoot_Application.getAppContext()), "experimental_comments", false);
|
||||||
}
|
}
|
||||||
@ -59,7 +63,7 @@ public class LithoAdRemoval {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static boolean containsAd(String value) {
|
public static boolean containsAd(String value) {
|
||||||
if (!(isExperimentalAdRemoval() || isExperimentalMerchandiseRemoval() || isExperimentalCommunityPostRemoval() || isExperimentalMovieUpsellRemoval() || isExperimentalCompactBannerRemoval() || isExperimentalCommentsRemoval() || isExperimentalCompactMovieRemoval() || isExperimentalHorizontalMovieShelfRemoval() || isInFeedSurvey() || isShortsShelf() || isCommunityGuidelines()) || value == null || value.isEmpty()) {
|
if (!(isExperimentalAdRemoval() || isExperimentalMerchandiseRemoval() || isExperimentalAppPromoBannerRemoval() || isExperimentalCommunityPostRemoval() || isExperimentalMovieUpsellRemoval() || isExperimentalCompactBannerRemoval() || isExperimentalCommentsRemoval() || isExperimentalCompactMovieRemoval() || isExperimentalHorizontalMovieShelfRemoval() || isInFeedSurvey() || isShortsShelf() || isCommunityGuidelines()) || value == null || value.isEmpty()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
List<String> blockList = new ArrayList<>();
|
List<String> blockList = new ArrayList<>();
|
||||||
@ -76,6 +80,9 @@ public class LithoAdRemoval {
|
|||||||
if (isExperimentalMovieUpsellRemoval()) {
|
if (isExperimentalMovieUpsellRemoval()) {
|
||||||
blockList.add("movie_and_show_upsell_card");
|
blockList.add("movie_and_show_upsell_card");
|
||||||
}
|
}
|
||||||
|
if (isExperimentalAppPromoBannerRemoval()) {
|
||||||
|
blockList.add("watch_metadata_app_promo");
|
||||||
|
}
|
||||||
if (isExperimentalCompactBannerRemoval()) {
|
if (isExperimentalCompactBannerRemoval()) {
|
||||||
blockList.add("compact_banner");
|
blockList.add("compact_banner");
|
||||||
}
|
}
|
||||||
@ -114,7 +121,7 @@ public class LithoAdRemoval {
|
|||||||
|
|
||||||
public static boolean containsAd(String value, ByteBuffer buffer) {
|
public static boolean containsAd(String value, ByteBuffer buffer) {
|
||||||
try {
|
try {
|
||||||
if (!(isExperimentalAdRemoval() || isExperimentalMerchandiseRemoval() || isExperimentalCommunityPostRemoval() || isExperimentalMovieUpsellRemoval() || isExperimentalCompactBannerRemoval() || isExperimentalCommentsRemoval() || isExperimentalCompactMovieRemoval() || isExperimentalHorizontalMovieShelfRemoval() || isInFeedSurvey() || isShortsShelf() || isCommunityGuidelines()) || value == null || value.isEmpty()) {
|
if (!(isExperimentalAdRemoval() || isExperimentalMerchandiseRemoval() || isExperimentalAppPromoBannerRemoval() || isExperimentalCommunityPostRemoval() || isExperimentalMovieUpsellRemoval() || isExperimentalCompactBannerRemoval() || isExperimentalCommentsRemoval() || isExperimentalCompactMovieRemoval() || isExperimentalHorizontalMovieShelfRemoval() || isInFeedSurvey() || isShortsShelf() || isCommunityGuidelines()) || value == null || value.isEmpty()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
List<String> blockList = new ArrayList<>();
|
List<String> blockList = new ArrayList<>();
|
||||||
@ -132,6 +139,9 @@ public class LithoAdRemoval {
|
|||||||
if (isExperimentalMovieUpsellRemoval()) {
|
if (isExperimentalMovieUpsellRemoval()) {
|
||||||
blockList.add("movie_and_show_upsell_card");
|
blockList.add("movie_and_show_upsell_card");
|
||||||
}
|
}
|
||||||
|
if (isExperimentalAppPromoBannerRemoval()) {
|
||||||
|
blockList.add("watch_metadata_app_promo");
|
||||||
|
}
|
||||||
if (isExperimentalCompactBannerRemoval()) {
|
if (isExperimentalCompactBannerRemoval()) {
|
||||||
blockList.add("compact_banner");
|
blockList.add("compact_banner");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user