diff --git a/src/main/kotlin/app/revanced/patches/youtube/general/mixplaylists/MixPlaylistsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/general/mixplaylists/MixPlaylistsPatch.kt index f10dcf007..7246b13df 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/general/mixplaylists/MixPlaylistsPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/general/mixplaylists/MixPlaylistsPatch.kt @@ -10,14 +10,12 @@ import app.revanced.patcher.patch.annotation.CompatiblePackage import app.revanced.patcher.patch.annotation.Patch import app.revanced.patcher.util.proxy.mutableTypes.MutableMethod import app.revanced.patcher.util.smali.ExternalLabel -import app.revanced.patches.youtube.general.mixplaylists.fingerprints.BottomPanelOverlayTextFingerprint import app.revanced.patches.youtube.general.mixplaylists.fingerprints.ElementParserFingerprint import app.revanced.patches.youtube.general.mixplaylists.fingerprints.EmptyFlatBufferFingerprint import app.revanced.patches.youtube.utils.litho.LithoFilterPatch import app.revanced.patches.youtube.utils.settings.SettingsPatch import app.revanced.util.bytecode.getStringIndex import app.revanced.util.integrations.Constants.COMPONENTS_PATH -import app.revanced.util.integrations.Constants.GENERAL import com.android.tools.smali.dexlib2.Opcode import com.android.tools.smali.dexlib2.iface.instruction.ReferenceInstruction import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction @@ -57,29 +55,12 @@ import com.android.tools.smali.dexlib2.iface.instruction.TwoRegisterInstruction @Suppress("unused") object MixPlaylistsPatch : BytecodePatch( setOf( - BottomPanelOverlayTextFingerprint, ElementParserFingerprint, EmptyFlatBufferFingerprint ) ) { override fun execute(context: BytecodeContext) { - /** - * Hide MixPlaylists when tablet UI is turned on - * Required only for RVX Patches - */ - BottomPanelOverlayTextFingerprint.result?.let { - it.mutableMethod.apply { - val insertIndex = it.scanResult.patternScanResult!!.endIndex - val insertRegister = getInstruction(insertIndex).registerA - - addInstruction( - insertIndex, - "invoke-static {v$insertRegister}, $GENERAL->hideMixPlaylists(Landroid/view/View;)V" - ) - } - } ?: throw BottomPanelOverlayTextFingerprint.exception - /** * Separated from bytebuffer patch * Target method is only used for Hide MixPlaylists patch diff --git a/src/main/kotlin/app/revanced/patches/youtube/general/mixplaylists/fingerprints/BottomPanelOverlayTextFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/general/mixplaylists/fingerprints/BottomPanelOverlayTextFingerprint.kt deleted file mode 100644 index 75cf0c617..000000000 --- a/src/main/kotlin/app/revanced/patches/youtube/general/mixplaylists/fingerprints/BottomPanelOverlayTextFingerprint.kt +++ /dev/null @@ -1,15 +0,0 @@ -package app.revanced.patches.youtube.general.mixplaylists.fingerprints - -import app.revanced.patcher.fingerprint.MethodFingerprint -import app.revanced.patches.youtube.utils.resourceid.SharedResourceIdPatch.BottomPanelOverlayText -import app.revanced.util.bytecode.isWideLiteralExists -import com.android.tools.smali.dexlib2.Opcode - -object BottomPanelOverlayTextFingerprint : MethodFingerprint( - opcodes = listOf( - Opcode.INVOKE_VIRTUAL, - Opcode.MOVE_RESULT_OBJECT, - Opcode.IPUT_OBJECT - ), - customFingerprint = { methodDef, _ -> methodDef.isWideLiteralExists(BottomPanelOverlayText) } -) \ No newline at end of file diff --git a/src/main/kotlin/app/revanced/patches/youtube/utils/resourceid/SharedResourceIdPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/utils/resourceid/SharedResourceIdPatch.kt index 04ec6673e..b9adbaacd 100644 --- a/src/main/kotlin/app/revanced/patches/youtube/utils/resourceid/SharedResourceIdPatch.kt +++ b/src/main/kotlin/app/revanced/patches/youtube/utils/resourceid/SharedResourceIdPatch.kt @@ -26,7 +26,6 @@ object SharedResourceIdPatch : ResourcePatch() { var BackgroundCategory: Long = -1 var Bar: Long = -1 var BarContainerHeight: Long = -1 - var BottomPanelOverlayText: Long = -1 var BottomSheetFooterText: Long = -1 var BottomUiContainerStub: Long = -1 var ChannelListSubMenu: Long = -1 @@ -108,7 +107,6 @@ object SharedResourceIdPatch : ResourcePatch() { BackgroundCategory = find(STRING, "pref_background_and_offline_category") Bar = find(LAYOUT, "bar") BarContainerHeight = find(DIMEN, "bar_container_height") - BottomPanelOverlayText = find(ID, "bottom_panel_overlay_text") BottomSheetFooterText = find(ID, "bottom_sheet_footer_text") BottomUiContainerStub = find(ID, "bottom_ui_container_stub") ChannelListSubMenu = find(LAYOUT, "channel_list_sub_menu")