Skip to content

Commit 2f0de15

Browse files
brossshoSumAtrIXLisoUseInAIKyrios
authored
feat(Instagram): Add Disable auto story flipping patch (#6262)
Co-authored-by: oSumAtrIX <[email protected]> Co-authored-by: LisoUseInAIKyrios <[email protected]>
1 parent df16037 commit 2f0de15

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed

patches/api/patches.api

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,10 @@ public final class app/revanced/patches/instagram/misc/signature/SignatureCheckP
320320
public static final fun getSignatureCheckPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
321321
}
322322

323+
public final class app/revanced/patches/instagram/story/flipping/DisableStoryAutoFlippingPatchKt {
324+
public static final fun getDisableStoryAutoFlippingPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
325+
}
326+
323327
public final class app/revanced/patches/irplus/ad/RemoveAdsPatchKt {
324328
public static final fun getRemoveAdsPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
325329
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package app.revanced.patches.instagram.story.flipping
2+
3+
import app.revanced.patcher.patch.bytecodePatch
4+
import app.revanced.util.returnEarly
5+
6+
@Suppress("unused")
7+
val disableStoryAutoFlippingPatch = bytecodePatch(
8+
name = "Disable story auto flipping",
9+
description = "Disable stories automatically flipping/skipping after some seconds.",
10+
use = false
11+
) {
12+
compatibleWith("com.instagram.android")
13+
14+
execute {
15+
onStoryTimeoutActionFingerprint.method.returnEarly()
16+
}
17+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package app.revanced.patches.instagram.story.flipping
2+
3+
import app.revanced.patcher.fingerprint
4+
5+
internal val onStoryTimeoutActionFingerprint = fingerprint {
6+
parameters("Ljava/lang/Object;")
7+
returns("V")
8+
strings("userSession")
9+
custom { _, classDef ->
10+
classDef.type == "Linstagram/features/stories/fragment/ReelViewerFragment;"
11+
}
12+
}

0 commit comments

Comments
 (0)