Compare commits

...
Sign in to create a new pull request.

6 commits

Author SHA1 Message Date
oSumAtrIX
dc1c538fa0
Apply suggestion from @oSumAtrIX 2026-03-20 20:11:23 +01:00
oSumAtrIX
d824190a14
Apply suggestion from @oSumAtrIX 2026-03-20 20:11:01 +01:00
oSumAtrIX
02b459200e
Apply suggestion from @oSumAtrIX 2026-03-20 20:10:41 +01:00
drobotk
541fbeeae8
refactor: use firstMethod(ref) 2026-03-18 23:10:36 +01:00
Dawid Krajcarz
b3e58d9ba3
Update patches/src/main/kotlin/app/revanced/patches/messenger/layout/Fingerprints.kt
Co-authored-by: oSumAtrIX <osumatrix@revanced.app>
2026-03-18 22:55:00 +01:00
drobotk
469f2aa912
feat(Messenger): Add Restore old emoji drawer patch 2026-03-17 12:58:17 +01:00
3 changed files with 38 additions and 6 deletions

View file

@ -421,6 +421,10 @@ public final class app/revanced/patches/messenger/layout/HideFacebookButtonPatch
public static final fun getHideFacebookButtonPatch ()Lapp/revanced/patcher/patch/Patch; public static final fun getHideFacebookButtonPatch ()Lapp/revanced/patcher/patch/Patch;
} }
public final class app/revanced/patches/messenger/layout/RestoreOldEmojiDrawerPatchKt {
public static final fun getRestoreOldEmojiDrawerPatch ()Lapp/revanced/patcher/patch/Patch;
}
public final class app/revanced/patches/messenger/metaai/RemoveMetaAIPatchKt { public final class app/revanced/patches/messenger/metaai/RemoveMetaAIPatchKt {
public static final fun getRemoveMetaAIPatch ()Lapp/revanced/patcher/patch/Patch; public static final fun getRemoveMetaAIPatch ()Lapp/revanced/patcher/patch/Patch;
} }
@ -632,7 +636,7 @@ public final class app/revanced/patches/photomath/misc/unlock/plus/UnlockPlusPat
} }
public final class app/revanced/patches/photoshopmix/BypassLoginPatchKt { public final class app/revanced/patches/photoshopmix/BypassLoginPatchKt {
public static final fun getBypassLoginPatch ()Lapp/revanced/patcher/patch/BytecodePatch; public static final fun getBypassLoginPatch ()Lapp/revanced/patcher/patch/Patch;
} }
public final class app/revanced/patches/piccomafr/misc/SpoofAndroidDeviceIdPatchKt { public final class app/revanced/patches/piccomafr/misc/SpoofAndroidDeviceIdPatchKt {

View file

@ -1,14 +1,20 @@
package app.revanced.patches.messenger.layout package app.revanced.patches.messenger.layout
import app.revanced.patcher.gettingFirstMethodDeclaratively import app.revanced.patcher.*
import app.revanced.patcher.parameterTypes
import app.revanced.patcher.patch.BytecodePatchContext import app.revanced.patcher.patch.BytecodePatchContext
import app.revanced.patcher.returnType import com.android.tools.smali.dexlib2.Opcode
import app.revanced.patcher.instructions
import app.revanced.patcher.invoke
internal val BytecodePatchContext.isFacebookButtonEnabledMethod by gettingFirstMethodDeclaratively { internal val BytecodePatchContext.isFacebookButtonEnabledMethod by gettingFirstMethodDeclaratively {
parameterTypes() parameterTypes()
returnType("Z") returnType("Z")
instructions("FacebookButtonTabButtonImplementation"(String::contains)) instructions("FacebookButtonTabButtonImplementation"(String::contains))
} }
internal val BytecodePatchContext.renderRedesignedDrawerMethodMatch by composingFirstMethod("Cannot render redesigned drawer with search icon ") {
instructions(
allOf(
Opcode.INVOKE_VIRTUAL(),
method { returnType == "Z" && parameterTypes.isEmpty() }
)
)
}

View file

@ -0,0 +1,22 @@
package app.revanced.patches.messenger.layout
import app.revanced.patcher.extensions.getInstruction
import app.revanced.patcher.extensions.methodReference
import app.revanced.patcher.firstMethod
import app.revanced.patcher.patch.bytecodePatch
import app.revanced.util.returnEarly
@Suppress("unused")
val restoreOldEmojiDrawerPatch = bytecodePatch(
name = "Restore old emoji drawer",
description = "Disables the new redesigned emoji drawer.",
) {
compatibleWith("com.facebook.orca")
apply {
val isRedesignedDrawerEnabledMethod = with(renderRedesignedDrawerMethodMatch) {
firstMethod(method.getInstruction(get(0)).methodReference!!)
}
isRedesignedDrawerEnabledMethod.returnEarly(false)
}
}