mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-01 15:14:34 +02:00
refactor(hide-shorts-navbar): no longer use dummy class - PivotBar in integrations
This commit is contained in:
parent
7b0d5f5111
commit
0266725e6e
@ -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;"
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user