fix(YouTube - Hide shorts components): Fix hiding navigation bar
This commit is contained in:
parent
569c3cde98
commit
2de51e65f0
|
@ -98,10 +98,10 @@ object HideShortsComponentsPatch : BytecodePatch(
|
||||||
|
|
||||||
SetPivotBarVisibilityFingerprint.result!!.let { result ->
|
SetPivotBarVisibilityFingerprint.result!!.let { result ->
|
||||||
result.mutableMethod.apply {
|
result.mutableMethod.apply {
|
||||||
val checkCastIndex = result.scanResult.patternScanResult!!.endIndex
|
val insertIndex = result.scanResult.patternScanResult!!.endIndex
|
||||||
val viewRegister = getInstruction<OneRegisterInstruction>(checkCastIndex).registerA
|
val viewRegister = getInstruction<OneRegisterInstruction>(insertIndex - 1).registerA
|
||||||
addInstruction(
|
addInstruction(
|
||||||
checkCastIndex + 1,
|
insertIndex,
|
||||||
"sput-object v$viewRegister, $FILTER_CLASS_DESCRIPTOR->pivotBar:" +
|
"sput-object v$viewRegister, $FILTER_CLASS_DESCRIPTOR->pivotBar:" +
|
||||||
"Lcom/google/android/libraries/youtube/rendering/ui/pivotbar/PivotBar;"
|
"Lcom/google/android/libraries/youtube/rendering/ui/pivotbar/PivotBar;"
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,19 +1,16 @@
|
||||||
package app.revanced.patches.youtube.layout.hide.shorts.fingerprints
|
package app.revanced.patches.youtube.layout.hide.shorts.fingerprints
|
||||||
|
|
||||||
|
import app.revanced.patcher.extensions.or
|
||||||
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint
|
||||||
|
import com.android.tools.smali.dexlib2.AccessFlags
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
|
|
||||||
object SetPivotBarVisibilityFingerprint : MethodFingerprint(
|
object SetPivotBarVisibilityFingerprint : MethodFingerprint(
|
||||||
|
returnType = "V",
|
||||||
|
accessFlags = AccessFlags.PRIVATE or AccessFlags.FINAL,
|
||||||
parameters = listOf("Z"),
|
parameters = listOf("Z"),
|
||||||
opcodes = listOf(
|
opcodes = listOf(
|
||||||
Opcode.IGET_OBJECT,
|
|
||||||
Opcode.INVOKE_VIRTUAL,
|
|
||||||
Opcode.MOVE_RESULT,
|
|
||||||
Opcode.IF_EQZ,
|
|
||||||
Opcode.RETURN_VOID,
|
|
||||||
Opcode.IGET_OBJECT,
|
|
||||||
Opcode.INVOKE_VIRTUAL,
|
|
||||||
Opcode.MOVE_RESULT_OBJECT,
|
|
||||||
Opcode.CHECK_CAST,
|
Opcode.CHECK_CAST,
|
||||||
|
Opcode.IF_EQZ
|
||||||
)
|
)
|
||||||
)
|
)
|
Loading…
Reference in a new issue