feat(Instagram): Add Enable location sticker redesign patch (#6808)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
parent
e19275fb7d
commit
4b699da220
3 changed files with 40 additions and 0 deletions
|
|
@ -377,6 +377,10 @@ public final class app/revanced/patches/instagram/story/flipping/DisableStoryAut
|
|||
public static final fun getDisableStoryAutoFlippingPatch ()Lapp/revanced/patcher/patch/Patch;
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/instagram/story/locationsticker/EnableLocationStickerRedesignPatchKt {
|
||||
public static final fun getEnableLocationStickerRedesignPatch ()Lapp/revanced/patcher/patch/Patch;
|
||||
}
|
||||
|
||||
public final class app/revanced/patches/irplus/ad/RemoveAdsPatchKt {
|
||||
public static final fun getRemoveAdsPatch ()Lapp/revanced/patcher/patch/Patch;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
package app.revanced.patches.instagram.story.locationsticker
|
||||
|
||||
import app.revanced.patcher.patch.bytecodePatch
|
||||
import app.revanced.util.returnEarly
|
||||
|
||||
@Suppress("unused")
|
||||
val enableLocationStickerRedesignPatch = bytecodePatch(
|
||||
name = "Enable location sticker redesign",
|
||||
description = "Unlocks the redesigned location sticker with additional style options.",
|
||||
use = false,
|
||||
) {
|
||||
compatibleWith("com.instagram.android")
|
||||
|
||||
apply {
|
||||
// The gate method reads a MobileConfig boolean flag and returns it directly.
|
||||
// Returning early with true bypasses the flag check entirely,
|
||||
// enabling the redesigned sticker styles regardless of server configuration.
|
||||
locationStickerRedesignGateMethodMatch.method.returnEarly(true)
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package app.revanced.patches.instagram.story.locationsticker
|
||||
|
||||
import app.revanced.patcher.composingFirstMethod
|
||||
import app.revanced.patcher.instructions
|
||||
import app.revanced.patcher.invoke
|
||||
import app.revanced.patcher.patch.BytecodePatchContext
|
||||
|
||||
// MobileConfig boolean key that gates the redesigned location sticker styles.
|
||||
// The method containing this constant reads the flag and returns it directly,
|
||||
// making it the sole control point for the feature. The key is stable across
|
||||
// app updates as MobileConfig keys are server-assigned constants.
|
||||
private const val LOCATION_STICKER_REDESIGN_CONFIG_KEY = 0x8105a100041e0dL
|
||||
|
||||
internal val BytecodePatchContext.locationStickerRedesignGateMethodMatch by composingFirstMethod {
|
||||
instructions(LOCATION_STICKER_REDESIGN_CONFIG_KEY())
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue