Skip to content

Commit

Permalink
feat(YouTube/Spoof app version): change the default to off and show t…
Browse files Browse the repository at this point in the history
…he dialog when the app is first installed
  • Loading branch information
inotia00 committed Oct 20, 2024
1 parent 6400a4c commit 105a9fa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package app.revanced.patches.youtube.general.spoofappversion
import app.revanced.patcher.data.ResourceContext
import app.revanced.patcher.extensions.InstructionExtensions.replaceInstruction
import app.revanced.patches.youtube.utils.compatibility.Constants.COMPATIBLE_PACKAGE
import app.revanced.patches.youtube.utils.integrations.Constants.GENERAL_CLASS_DESCRIPTOR
import app.revanced.patches.youtube.utils.integrations.Constants.PATCH_STATUS_CLASS_DESCRIPTOR
import app.revanced.patches.youtube.utils.settings.SettingsBytecodePatch
import app.revanced.patches.youtube.utils.settings.SettingsPatch
Expand Down Expand Up @@ -42,18 +41,6 @@ object SpoofAppVersionPatch : BaseResourcePatch(
0,
"const-string v0, \"19.13.37\""
)
SettingsBytecodePatch.contexts.findMethodOrThrow(PATCH_STATUS_CLASS_DESCRIPTOR) {
name == "SpoofAppVersionDefaultBoolean"
}.replaceInstruction(
0,
"const/4 v0, 0x1"
)
SettingsBytecodePatch.contexts.findMethodOrThrow(PATCH_STATUS_CLASS_DESCRIPTOR) {
name == "SpoofAppVersionUserDialogMessage"
}.replaceInstruction(
0,
"const-string v0, \"revanced_spoof_app_version_user_dialog_message_19_16\""
)
}
}
}
Expand Down
6 changes: 5 additions & 1 deletion src/main/resources/youtube/settings/host/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
<string name="revanced_extended_confirm_user_dialog_title">Do you wish to proceed?</string>
<string name="revanced_extended_restart_first_run">Restart to load the layout normally</string>
<string name="revanced_extended_restart_message">Refresh and restart</string>
<string name="revanced_extended_restart_first_run_rolling_number">"There is a YouTube server-side bug that causes rolling number text such as likes, views, and upload dates to be hidden for some users.

A temporary workaround for this issue is to spoof the app version to 19.13.37.

Do you want to spoof the app version before restarting the app?"</string>
<string name="revanced_playback_speed_normal">Normal</string>

<string name="revanced_external_downloader_package_name_video_title">Video downloader package name</string>
Expand Down Expand Up @@ -375,7 +380,6 @@ This does not bypass the age restriction. It just accepts it automatically."</st
This will change the appearance and features of the app, but unknown side effects may occur.

If later turned off, it is recommended to clear the app data to prevent UI bugs."</string>
<string name="revanced_spoof_app_version_user_dialog_message_19_16">Disabling this setting may result in a YouTube server-side bug that causes rolling number text such as likes, views, and upload dates to be hidden.</string>
<string name="revanced_spoof_app_version_target_title">Edit spoof app version</string>
<string name="revanced_spoof_app_version_target_summary">Type the spoof app version target.</string>
<string name="revanced_spoof_app_version_target_entry_title">Spoof app version target</string>
Expand Down

0 comments on commit 105a9fa

Please sign in to comment.