Skip to content

Commit a56dc01

Browse files
committed
feat: disable feed video autoplay
1 parent 1bc2d98 commit a56dc01

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#import "../../Utils.h"
2+
3+
// Demangled name: IGFeedPlayback.IGFeedPlaybackStrategy
4+
%hook _TtC14IGFeedPlayback22IGFeedPlaybackStrategy
5+
- (id)initWithShouldDisableAutoplay:(_Bool)autoplay {
6+
if ([SCIUtils getBoolPref:@"disable_feed_autoplay"]) return %orig(true);
7+
8+
return %orig(autoplay);
9+
}
10+
%end

src/Settings/TweakSettings.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ + (NSArray *)sections {
7070
[SCISetting switchCellWithTitle:@"No suggested posts" subtitle:@"Removes suggested posts from your feed" defaultsKey:@"no_suggested_post"],
7171
[SCISetting switchCellWithTitle:@"No suggested for you" subtitle:@"Hides suggested accounts for you to follow" defaultsKey:@"no_suggested_account"],
7272
[SCISetting switchCellWithTitle:@"No suggested reels" subtitle:@"Hides suggested reels to watch" defaultsKey:@"no_suggested_reels"],
73-
[SCISetting switchCellWithTitle:@"No suggested threads posts" subtitle:@"Hides suggested threads posts" defaultsKey:@"no_suggested_threads"]
73+
[SCISetting switchCellWithTitle:@"No suggested threads posts" subtitle:@"Hides suggested threads posts" defaultsKey:@"no_suggested_threads"],
74+
[SCISetting switchCellWithTitle:@"Disable video autoplay" subtitle:@"Prevents videos on your feed from playing automatically" defaultsKey:@"disable_feed_autoplay"]
7475
]
7576
}]
7677
],

0 commit comments

Comments
 (0)