mirror of
https://github.com/revanced/revanced-patches
synced 2024-09-04 05:26:14 +02:00
fix(YouTube - Hide info cards): Fix info cards not hiding for some users (#3039)
This commit is contained in:
parent
ec37be2b7e
commit
cb38637e6b
@ -13,6 +13,7 @@ import app.revanced.patches.youtube.layout.hide.infocards.fingerprints.Infocards
|
|||||||
import app.revanced.patches.youtube.layout.hide.infocards.fingerprints.InfocardsIncognitoParentFingerprint
|
import app.revanced.patches.youtube.layout.hide.infocards.fingerprints.InfocardsIncognitoParentFingerprint
|
||||||
import app.revanced.patches.youtube.layout.hide.infocards.fingerprints.InfocardsMethodCallFingerprint
|
import app.revanced.patches.youtube.layout.hide.infocards.fingerprints.InfocardsMethodCallFingerprint
|
||||||
import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch
|
import app.revanced.patches.youtube.misc.integrations.IntegrationsPatch
|
||||||
|
import app.revanced.patches.youtube.misc.litho.filter.LithoFilterPatch
|
||||||
import com.android.tools.smali.dexlib2.Opcode
|
import com.android.tools.smali.dexlib2.Opcode
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.FiveRegisterInstruction
|
||||||
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
||||||
@ -22,6 +23,7 @@ import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction
|
|||||||
description = "Hides info cards in videos.",
|
description = "Hides info cards in videos.",
|
||||||
dependencies = [
|
dependencies = [
|
||||||
IntegrationsPatch::class,
|
IntegrationsPatch::class,
|
||||||
|
LithoFilterPatch::class,
|
||||||
HideInfocardsResourcePatch::class
|
HideInfocardsResourcePatch::class
|
||||||
],
|
],
|
||||||
compatiblePackages = [
|
compatiblePackages = [
|
||||||
@ -45,6 +47,9 @@ object HideInfoCardsPatch : BytecodePatch(
|
|||||||
InfocardsMethodCallFingerprint,
|
InfocardsMethodCallFingerprint,
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
|
private const val FILTER_CLASS_DESCRIPTOR =
|
||||||
|
"Lapp/revanced/integrations/patches/components/HideInfoCardsFilterPatch;"
|
||||||
|
|
||||||
override fun execute(context: BytecodeContext) {
|
override fun execute(context: BytecodeContext) {
|
||||||
InfocardsIncognitoFingerprint.also {
|
InfocardsIncognitoFingerprint.also {
|
||||||
it.resolve(context, InfocardsIncognitoParentFingerprint.result!!.classDef)
|
it.resolve(context, InfocardsIncognitoParentFingerprint.result!!.classDef)
|
||||||
@ -79,5 +84,8 @@ object HideInfoCardsPatch : BytecodePatch(
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Info cards can also appear as litho components.
|
||||||
|
LithoFilterPatch.addFilter(FILTER_CLASS_DESCRIPTOR)
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user