diff --git a/src/main/kotlin/app/revanced/patches/youtube/shorts/commentpopuppanels/NewCommentPopupPanelsPatch.kt b/src/main/kotlin/app/revanced/patches/youtube/shorts/commentpopuppanels/NewCommentPopupPanelsPatch.kt deleted file mode 100644 index 21e50e6e1..000000000 --- a/src/main/kotlin/app/revanced/patches/youtube/shorts/commentpopuppanels/NewCommentPopupPanelsPatch.kt +++ /dev/null @@ -1,75 +0,0 @@ -package app.revanced.patches.youtube.shorts.commentpopuppanels - -import app.revanced.extensions.exception -import app.revanced.patcher.data.BytecodeContext -import app.revanced.patcher.extensions.InstructionExtensions.addInstructions -import app.revanced.patcher.extensions.InstructionExtensions.getInstruction -import app.revanced.patcher.patch.BytecodePatch -import app.revanced.patcher.patch.annotation.CompatiblePackage -import app.revanced.patcher.patch.annotation.Patch -import app.revanced.patches.youtube.shorts.commentpopuppanels.fingerprints.ReelWatchFragmentBuilderFingerprint -import app.revanced.patches.youtube.utils.settings.SettingsPatch -import app.revanced.util.bytecode.getWide32LiteralIndex -import app.revanced.util.integrations.Constants.SHORTS -import com.android.tools.smali.dexlib2.iface.instruction.OneRegisterInstruction - -@Patch( - name = "Enable new comment popup panels", - description = "Enables a new type of comment popup panel in the shorts player.", - dependencies = [SettingsPatch::class], - compatiblePackages = [ - CompatiblePackage( - "com.google.android.youtube", - [ - "18.24.37", - "18.25.40", - "18.27.36", - "18.29.38", - "18.30.37", - "18.31.40", - "18.32.39", - "18.33.40", - "18.34.38", - "18.35.36", - "18.36.39", - "18.37.36", - "18.38.44", - "18.39.41", - "18.40.34" - ] - ) - ] -) -@Suppress("unused") -object NewCommentPopupPanelsPatch : BytecodePatch( - setOf(ReelWatchFragmentBuilderFingerprint) -) { - override fun execute(context: BytecodeContext) { - - ReelWatchFragmentBuilderFingerprint.result?.let { - it.mutableMethod.apply { - val targetIndex = getWide32LiteralIndex(45401415) + 2 - val targetRegister = getInstruction(targetIndex).registerA - - addInstructions( - targetIndex + 1, """ - invoke-static {}, $SHORTS->enableNewCommentPopupPanels()Z - move-result v$targetRegister - """ - ) - } - } ?: throw ReelWatchFragmentBuilderFingerprint.exception - - /** - * Add settings - */ - SettingsPatch.addPreference( - arrayOf( - "SETTINGS: ENABLE_NEW_COMMENT_POPUP_PANELS" - ) - ) - - SettingsPatch.updatePatchStatus("Enable new comment popup panels") - - } -} diff --git a/src/main/kotlin/app/revanced/patches/youtube/shorts/commentpopuppanels/fingerprints/ReelWatchFragmentBuilderFingerprint.kt b/src/main/kotlin/app/revanced/patches/youtube/shorts/commentpopuppanels/fingerprints/ReelWatchFragmentBuilderFingerprint.kt deleted file mode 100644 index 7be9bdb98..000000000 --- a/src/main/kotlin/app/revanced/patches/youtube/shorts/commentpopuppanels/fingerprints/ReelWatchFragmentBuilderFingerprint.kt +++ /dev/null @@ -1,17 +0,0 @@ -package app.revanced.patches.youtube.shorts.commentpopuppanels.fingerprints - -import app.revanced.patcher.extensions.or -import app.revanced.patcher.fingerprint.method.impl.MethodFingerprint -import app.revanced.util.bytecode.isWide32LiteralExists -import com.android.tools.smali.dexlib2.AccessFlags - -object ReelWatchFragmentBuilderFingerprint : MethodFingerprint( - returnType = "Landroid/view/View;", - accessFlags = AccessFlags.PUBLIC or AccessFlags.FINAL, - parameters = listOf( - "Landroid/view/LayoutInflater;", - "Landroid/view/ViewGroup;", - "Landroid/os/Bundle;" - ), - customFingerprint = { methodDef, _ -> methodDef.isWide32LiteralExists(45401415) } -) \ No newline at end of file diff --git a/src/main/resources/youtube/settings/xml/revanced_prefs.xml b/src/main/resources/youtube/settings/xml/revanced_prefs.xml index 91cd8b00d..a97c5570e 100644 --- a/src/main/resources/youtube/settings/xml/revanced_prefs.xml +++ b/src/main/resources/youtube/settings/xml/revanced_prefs.xml @@ -418,7 +418,6 @@ - @@ -606,9 +605,6 @@ - -