feat(YouTube/Spoof app version): add target version 18.40.34 - Disables rolling counts

This commit is contained in:
inotia00 2023-11-09 16:24:00 +09:00
parent 771df3852c
commit 2687052caa
2 changed files with 18 additions and 6 deletions

View File

@ -50,7 +50,21 @@ object SpoofAppVersionPatch : AbstractVersionSpoofPatch(
contexts.copyXmlNode("youtube/spoofappversion/host", "values/arrays.xml", "resources")
if (SettingsPatch.upward1834) {
contexts.appendChild()
contexts.appendChild(
arrayOf(
"revanced_spoof_app_version_target_entry" to "@string/revanced_spoof_app_version_target_entry_18_33_40",
"revanced_spoof_app_version_target_entry_value" to "18.33.40",
)
)
if (SettingsPatch.upward1841) {
contexts.appendChild(
arrayOf(
"revanced_spoof_app_version_target_entry" to "@string/revanced_spoof_app_version_target_entry_18_40_34",
"revanced_spoof_app_version_target_entry_value" to "18.40.34",
)
)
}
}
/**
@ -67,11 +81,8 @@ object SpoofAppVersionPatch : AbstractVersionSpoofPatch(
}
private fun ResourceContext.appendChild() {
arrayOf(
"revanced_spoof_app_version_target_entry" to "@string/revanced_spoof_app_version_target_entry_18_33_40",
"revanced_spoof_app_version_target_entry_value" to "18.33.40",
).map { (attributeName, attributeValue) ->
private fun ResourceContext.appendChild(entryArray: Array<Pair<String, String>>) {
entryArray.map { (attributeName, attributeValue) ->
this.xmlEditor["res/values/arrays.xml"].use { editor ->
editor.file.apply {
val resourcesNode = getElementsByTagName("resources").item(0) as Element

View File

@ -684,6 +684,7 @@ Tap and hold to set playback speed to 1.0x."</string>
<string name="revanced_spoof_app_version_target_entry_18_05_40">18.05.40 - Restore old comment input box</string>
<string name="revanced_spoof_app_version_target_entry_18_17_43">18.17.43 - Restore old player flyout panel</string>
<string name="revanced_spoof_app_version_target_entry_18_33_40">18.33.40 - Restore old shorts action bar</string>
<string name="revanced_spoof_app_version_target_entry_18_40_34">"18.40.34 - Disables 'views' and 'likes' from being updated in real time"</string>
<string name="revanced_spoof_app_version_target_entry_title">Spoof app version target</string>
<string name="revanced_spoof_app_version_target_summary">Type the spoof app version target.</string>
<string name="revanced_spoof_app_version_target_title">Edit spoof app version</string>