From fcac5aecd1cb2136a3027722e25786475ff398f0 Mon Sep 17 00:00:00 2001
From: inotia00 <108592928+inotia00@users.noreply.github.com>
Date: Thu, 25 Jan 2024 07:00:14 +0900
Subject: [PATCH] feat(YouTube/Spoof app version): add target version 18.42.41
- Fixes issue where theme is not applied in search results
---
.../youtube/misc/spoofappversion/SpoofAppVersionPatch.kt | 9 +++++++++
.../patches/youtube/utils/settings/SettingsPatch.kt | 2 ++
.../resources/youtube/settings/host/values/strings.xml | 1 +
3 files changed, 12 insertions(+)
diff --git a/src/main/kotlin/app/revanced/patches/youtube/misc/spoofappversion/SpoofAppVersionPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/misc/spoofappversion/SpoofAppVersionPatch.kt
index bd57f8b58..5fe09b361 100644
--- a/src/main/kotlin/app/revanced/patches/youtube/misc/spoofappversion/SpoofAppVersionPatch.kt
+++ b/src/main/kotlin/app/revanced/patches/youtube/misc/spoofappversion/SpoofAppVersionPatch.kt
@@ -77,6 +77,15 @@ object SpoofAppVersionPatch : AbstractVersionSpoofPatch(
"revanced_spoof_app_version_target_entry_value" to "18.40.34"
)
)
+
+ if (SettingsPatch.upward1843) {
+ contexts.appendChild(
+ arrayOf(
+ "revanced_spoof_app_version_target_entry" to "@string/revanced_spoof_app_version_target_entry_18_42_41",
+ "revanced_spoof_app_version_target_entry_value" to "18.42.41"
+ )
+ )
+ }
}
}
}
diff --git a/src/main/kotlin/app/revanced/patches/youtube/utils/settings/SettingsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/utils/settings/SettingsPatch.kt
index 9af70f7f3..6b5a8329a 100644
--- a/src/main/kotlin/app/revanced/patches/youtube/utils/settings/SettingsPatch.kt
+++ b/src/main/kotlin/app/revanced/patches/youtube/utils/settings/SettingsPatch.kt
@@ -91,6 +91,7 @@ object SettingsPatch : AbstractSettingsResourcePatch(
upward1834 = 233502000 <= playServicesVersion
upward1839 = 234002000 <= playServicesVersion
upward1841 = 234200000 <= playServicesVersion
+ upward1843 = 234400000 <= playServicesVersion
break
}
@@ -160,6 +161,7 @@ object SettingsPatch : AbstractSettingsResourcePatch(
internal var upward1834: Boolean = false
internal var upward1839: Boolean = false
internal var upward1841: Boolean = false
+ internal var upward1843: Boolean = false
internal fun addPreference(settingArray: Array) {
contexts.addPreference(settingArray)
diff --git a/src/main/resources/youtube/settings/host/values/strings.xml b/src/main/resources/youtube/settings/host/values/strings.xml
index 3e46e3896..b9cebb325 100644
--- a/src/main/resources/youtube/settings/host/values/strings.xml
+++ b/src/main/resources/youtube/settings/host/values/strings.xml
@@ -807,6 +807,7 @@ This does not bypass the age restriction. It just accepts it automatically."18.33.40 - Restore old shorts action bar
18.38.45 - Restore old default video quality behavior
"18.40.34 - Disables 'views' and 'likes' from being updated in real time"
+ 18.42.41 - Fixes issue where theme is not applied in search results
Spoof app version target
Type the spoof app version target.
Edit spoof app version