feat(Instagram): Add Disable Reels auto-scroll patch (#6736)

Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
Aaron Mompié 2026-03-14 13:52:12 +01:00 committed by GitHub
parent b2b1e4f993
commit 806d6c799f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 52 additions and 1 deletions

View file

@ -357,6 +357,10 @@ public final class app/revanced/patches/instagram/reels/DisableReelsScrollingPat
public static final fun getDisableReelsScrollingPatch ()Lapp/revanced/patcher/patch/Patch; public static final fun getDisableReelsScrollingPatch ()Lapp/revanced/patcher/patch/Patch;
} }
public final class app/revanced/patches/instagram/reels/autoscroll/DisableReelsAutoScrollPatchKt {
public static final fun getDisableReelsAutoScrollPatch ()Lapp/revanced/patcher/patch/Patch;
}
public final class app/revanced/patches/instagram/story/flipping/DisableStoryAutoFlippingPatchKt { public final class app/revanced/patches/instagram/story/flipping/DisableStoryAutoFlippingPatchKt {
public static final fun getDisableStoryAutoFlippingPatch ()Lapp/revanced/patcher/patch/Patch; public static final fun getDisableStoryAutoFlippingPatch ()Lapp/revanced/patcher/patch/Patch;
} }
@ -888,6 +892,7 @@ public final class app/revanced/patches/shared/misc/gms/GmsCoreSupportPatchKt {
public static synthetic fun gmsCoreSupportPatch$default (Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Ljava/util/Set;Lkotlin/Pair;Lapp/revanced/patcher/patch/Patch;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lapp/revanced/patcher/patch/Patch; public static synthetic fun gmsCoreSupportPatch$default (Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;Ljava/util/Set;Lkotlin/Pair;Lapp/revanced/patcher/patch/Patch;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lapp/revanced/patcher/patch/Patch;
public static final fun gmsCoreSupportResourcePatch (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lapp/revanced/patcher/patch/Option;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;)Lapp/revanced/patcher/patch/Patch; public static final fun gmsCoreSupportResourcePatch (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lapp/revanced/patcher/patch/Option;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;)Lapp/revanced/patcher/patch/Patch;
public static synthetic fun gmsCoreSupportResourcePatch$default (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lapp/revanced/patcher/patch/Option;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lapp/revanced/patcher/patch/Patch; public static synthetic fun gmsCoreSupportResourcePatch$default (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lapp/revanced/patcher/patch/Option;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lapp/revanced/patcher/patch/Patch;
public static final fun prefixOrReplace (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
} }
public final class app/revanced/patches/shared/misc/hex/HexPatchBuilder : java/util/Set, kotlin/jvm/internal/markers/KMappedMarker { public final class app/revanced/patches/shared/misc/hex/HexPatchBuilder : java/util/Set, kotlin/jvm/internal/markers/KMappedMarker {
@ -1867,7 +1872,7 @@ public final class app/revanced/patches/youtube/misc/settings/PreferenceScreen :
public final fun getADS ()Lapp/revanced/patches/shared/misc/settings/preference/BasePreferenceScreen$Screen; public final fun getADS ()Lapp/revanced/patches/shared/misc/settings/preference/BasePreferenceScreen$Screen;
public final fun getALTERNATIVE_THUMBNAILS ()Lapp/revanced/patches/shared/misc/settings/preference/BasePreferenceScreen$Screen; public final fun getALTERNATIVE_THUMBNAILS ()Lapp/revanced/patches/shared/misc/settings/preference/BasePreferenceScreen$Screen;
public final fun getFEED ()Lapp/revanced/patches/shared/misc/settings/preference/BasePreferenceScreen$Screen; public final fun getFEED ()Lapp/revanced/patches/shared/misc/settings/preference/BasePreferenceScreen$Screen;
public final fun getGENERAL_LAYOUT ()Lapp/revanced/patches/shared/misc/settings/preference/BasePreferenceScreen$Screen; public final fun getGENERAL ()Lapp/revanced/patches/shared/misc/settings/preference/BasePreferenceScreen$Screen;
public final fun getMISC ()Lapp/revanced/patches/shared/misc/settings/preference/BasePreferenceScreen$Screen; public final fun getMISC ()Lapp/revanced/patches/shared/misc/settings/preference/BasePreferenceScreen$Screen;
public final fun getPLAYER ()Lapp/revanced/patches/shared/misc/settings/preference/BasePreferenceScreen$Screen; public final fun getPLAYER ()Lapp/revanced/patches/shared/misc/settings/preference/BasePreferenceScreen$Screen;
public final fun getRETURN_YOUTUBE_DISLIKE ()Lapp/revanced/patches/shared/misc/settings/preference/BasePreferenceScreen$Screen; public final fun getRETURN_YOUTUBE_DISLIKE ()Lapp/revanced/patches/shared/misc/settings/preference/BasePreferenceScreen$Screen;

View file

@ -0,0 +1,22 @@
package app.revanced.patches.instagram.reels.autoscroll
import app.revanced.patcher.patch.bytecodePatch
import app.revanced.util.returnEarly
@Suppress("unused")
val disableReelsAutoScrollPatch = bytecodePatch(
name = "Disable Reels auto-scroll",
description = "Removes the auto-scroll toggle and prevents Reels from scrolling automatically.",
use = false,
) {
compatibleWith("com.instagram.android")
apply {
// Prevent the auto-scroll feature from being initialized.
// When this returns false, ClipsViewerFragment skips creating the auto-scroller.
clipsAutoScrollFeatureCheckMethod.returnEarly()
// Make the toggle button handler a no-op so tapping it does nothing.
clipsAutoScrollToggleMethod.returnEarly()
}
}

View file

@ -0,0 +1,24 @@
package app.revanced.patches.instagram.reels.autoscroll
import app.revanced.patcher.gettingFirstMethodDeclaratively
import app.revanced.patcher.parameterTypes
import app.revanced.patcher.patch.BytecodePatchContext
import app.revanced.patcher.returnType
/**
* Matches the feature availability gate that determines
* whether auto-scroll should be available for Reels.
*/
internal val BytecodePatchContext.clipsAutoScrollFeatureCheckMethod by gettingFirstMethodDeclaratively("auto_scroll") {
returnType("Z")
parameterTypes("Lcom/instagram/common/session/UserSession;", "Z")
}
/**
* Matches the toggle handler called when the user taps
* the auto-scroll button. Contains analytics logging strings.
*/
internal val BytecodePatchContext.clipsAutoScrollToggleMethod by gettingFirstMethodDeclaratively(
"auto_scroll",
"instagram_clips_viewer_autoplay_tap",
)