From cd110acc9d0ce4853c88f4c35be3a7a3a4937114 Mon Sep 17 00:00:00 2001 From: inotia00 <108592928+inotia00@users.noreply.github.com> Date: Mon, 20 Jan 2025 02:39:31 +0900 Subject: [PATCH] fix(YouTube - Shorts components): Settings not added in `19.16.39` https://github.com/inotia00/ReVanced_Extended/issues/2704 --- .../shorts/components/ShortsComponentPatch.kt | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/patches/src/main/kotlin/app/revanced/patches/youtube/shorts/components/ShortsComponentPatch.kt b/patches/src/main/kotlin/app/revanced/patches/youtube/shorts/components/ShortsComponentPatch.kt index d27ce1118..8d7b386d4 100644 --- a/patches/src/main/kotlin/app/revanced/patches/youtube/shorts/components/ShortsComponentPatch.kt +++ b/patches/src/main/kotlin/app/revanced/patches/youtube/shorts/components/ShortsComponentPatch.kt @@ -893,7 +893,15 @@ val shortsComponentPatch = bytecodePatch( nop """ - if (!is_19_25_or_greater) { + if (is_19_25_or_greater) { + shortsPlaybackIntentFingerprint.methodOrThrow().addInstructionsWithLabels( + 0, + """ + move-object/from16 v0, p1 + ${extensionInstructions(0, 1)} + """ + ) + } else { shortsPlaybackIntentLegacyFingerprint.methodOrThrow().apply { val index = indexOfFirstInstructionOrThrow { getReference()?.returnType == PLAYBACK_START_DESCRIPTOR_CLASS_DESCRIPTOR @@ -906,18 +914,8 @@ val shortsComponentPatch = bytecodePatch( extensionInstructions(playbackStartRegister, freeRegister) ) } - - return@execute } - shortsPlaybackIntentFingerprint.methodOrThrow().addInstructionsWithLabels( - 0, - """ - move-object/from16 v0, p1 - ${extensionInstructions(0, 1)} - """ - ) - // endregion addLithoFilter(BUTTON_FILTER_CLASS_DESCRIPTOR)