From 9770ba2a0e7aaafa452d4cc738b35261b01f17a0 Mon Sep 17 00:00:00 2001 From: OxrxL <108184954+OxrxL@users.noreply.github.com> Date: Tue, 8 Nov 2022 18:10:04 +0100 Subject: [PATCH] refactor(youtube/general-ads-patch): removed redundant code (#1003) --- .../bytecode/patch/GeneralBytecodeAdsPatch.kt | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/main/kotlin/app/revanced/patches/youtube/ad/general/bytecode/patch/GeneralBytecodeAdsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/ad/general/bytecode/patch/GeneralBytecodeAdsPatch.kt index 5502d338b..b4126f3fe 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/ad/general/bytecode/patch/GeneralBytecodeAdsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/ad/general/bytecode/patch/GeneralBytecodeAdsPatch.kt @@ -50,7 +50,6 @@ class GeneralBytecodeAdsPatch : BytecodePatch() { private val resourceIds = arrayOf( "ad_attribution", "reel_multiple_items_shelf", - "info_cards_drawer_header", ).map { name -> ResourceMappingResourcePatch.resourceMappings.single { it.name == name }.id } @@ -224,21 +223,6 @@ class GeneralBytecodeAdsPatch : BytecodePatch() { val viewRegister = (iPutInstruction as Instruction22c).registerA mutableMethod!!.implementation!!.injectHideCall(insertIndex, viewRegister) } - - resourceIds[2] -> { // info cards ads - // and is followed by an instruction with the mnemonic INVOKE_VIRTUAL - val removeIndex = index - 1 - val invokeInstruction = instructions.elementAt(removeIndex) - if (invokeInstruction.opcode != Opcode.INVOKE_VIRTUAL) return@forEachIndexed - - // create proxied method, make sure to not re-resolve() the current class - if (mutableClass == null) mutableClass = context.proxy(classDef).mutableClass - if (mutableMethod == null) mutableMethod = - mutableClass!!.findMutableMethodOf(method) - - //ToDo: Add Settings toggle for whatever this is - mutableMethod!!.implementation!!.removeInstruction(removeIndex) - } } }