From 7dc0108859e1c359744d767fedb6ff989b9892c9 Mon Sep 17 00:00:00 2001
From: inotia00 <108592928+inotia00@users.noreply.github.com>
Date: Sat, 23 Dec 2023 16:36:25 +0900
Subject: [PATCH] feat(YouTube Music/Hide general ads): remove `Close
interstitial ads` settings
---
.../patches/music/ads/general/GeneralAdsPatch.kt | 11 +++--------
.../resources/music/settings/host/values/strings.xml | 3 ---
2 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/src/main/kotlin/app/revanced/patches/music/ads/general/GeneralAdsPatch.kt b/src/main/kotlin/app/revanced/patches/music/ads/general/GeneralAdsPatch.kt
index 71b3f30c3..69191bcf3 100644
--- a/src/main/kotlin/app/revanced/patches/music/ads/general/GeneralAdsPatch.kt
+++ b/src/main/kotlin/app/revanced/patches/music/ads/general/GeneralAdsPatch.kt
@@ -47,6 +47,9 @@ object GeneralAdsPatch : BytecodePatch(
NotifierShelfFingerprint
)
) {
+ private const val FILTER_CLASS_DESCRIPTOR =
+ "$COMPONENTS_PATH/AdsFilter;"
+
override fun execute(context: BytecodeContext) {
LithoFilterPatch.addFilter(FILTER_CLASS_DESCRIPTOR)
@@ -117,11 +120,6 @@ object GeneralAdsPatch : BytecodePatch(
}
} ?: throw NotifierShelfFingerprint.exception
- SettingsPatch.addMusicPreference(
- CategoryType.ADS,
- "revanced_close_interstitial_ads",
- "true"
- )
SettingsPatch.addMusicPreference(
CategoryType.ADS,
"revanced_hide_interstitial_ads",
@@ -148,7 +146,4 @@ object GeneralAdsPatch : BytecodePatch(
"true"
)
}
-
- private const val FILTER_CLASS_DESCRIPTOR =
- "$COMPONENTS_PATH/AdsFilter;"
}
diff --git a/src/main/resources/music/settings/host/values/strings.xml b/src/main/resources/music/settings/host/values/strings.xml
index 927473d32..8ecff8dba 100644
--- a/src/main/resources/music/settings/host/values/strings.xml
+++ b/src/main/resources/music/settings/host/values/strings.xml
@@ -22,9 +22,6 @@
Subscription
Changes the start page of the app.
Change start page
- Automatically closes interstitial ads that cannot be hidden by \"Hide interstitial ads\".
- Close interstitial ads
- Closing interstitial ads.
Filter component names by line-seperated.
Edit custom filter
Invalid custom filter, resetting to default.