From 0266725e6eb6e41096a108cd70decdb2c259e66b Mon Sep 17 00:00:00 2001 From: inotia00 Date: Fri, 28 Apr 2023 11:49:50 +0900 Subject: [PATCH] refactor(hide-shorts-navbar): no longer use dummy class - PivotBar in integrations --- .../navigation/shortsnavbar/patch/ShortsNavBarPatch.kt | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/main/kotlin/app/revanced/patches/youtube/layout/navigation/shortsnavbar/patch/ShortsNavBarPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/layout/navigation/shortsnavbar/patch/ShortsNavBarPatch.kt index 0720951fb..5c2f32316 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/layout/navigation/shortsnavbar/patch/ShortsNavBarPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/layout/navigation/shortsnavbar/patch/ShortsNavBarPatch.kt @@ -47,14 +47,11 @@ class ShortsNavBarPatch : BytecodePatch( with (it.mutableMethod) { val startIndex = it.scanResult.patternScanResult!!.startIndex val instructions = implementation!!.instructions - - val indexReference = ((instructions[startIndex] as ReferenceInstruction).reference as DexBackedTypeReference).toString() - if (indexReference != targetReference) return SetPivotBarFingerprint.toErrorResult() val register = (instructions[startIndex] as OneRegisterInstruction).registerA addInstruction( startIndex + 1, - "sput-object v$register, $NAVIGATION->pivotbar:$targetReference" + "sput-object v$register, $NAVIGATION->pivotBar:Ljava/lang/Object;" ) } } ?: return SetPivotBarFingerprint.toErrorResult() @@ -119,9 +116,4 @@ class ShortsNavBarPatch : BytecodePatch( return PatchResultSuccess() } - - private companion object { - const val targetReference = - "Lcom/google/android/apps/youtube/app/ui/pivotbar/PivotBar;" - } } \ No newline at end of file