From 89c5a25512f419e93192f91aa220489891c20b09 Mon Sep 17 00:00:00 2001 From: faroukbmiled Date: Fri, 10 Apr 2026 01:52:50 +0100 Subject: [PATCH] feat: Hide Repost Button in reels tab Closes #2 --- README.md | 1 + src/Settings/TweakSettings.m | 3 ++- src/Tweak.x | 10 ++++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 41f7272..73b11eb 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,7 @@ A feature-rich iOS tweak for Instagram, forked from [SCInsta](https://github.com - Confirm reel refresh - Unlock password-locked reels **\*** - Hide reels header +- Hide repost button in reels **\*** - Hide reels blend button - Disable scrolling reels - Prevent doom scrolling (limit maximum viewable reels) diff --git a/src/Settings/TweakSettings.m b/src/Settings/TweakSettings.m index 1f5426a..5b0ad77 100644 --- a/src/Settings/TweakSettings.m +++ b/src/Settings/TweakSettings.m @@ -97,7 +97,8 @@ @{ @"header": @"Hiding", @"rows": @[ - [SCISetting switchCellWithTitle:@"Hide reels header" subtitle:@"Hides the top navigation bar when watching reels" defaultsKey:@"hide_reels_header"] + [SCISetting switchCellWithTitle:@"Hide reels header" subtitle:@"Hides the top navigation bar when watching reels" defaultsKey:@"hide_reels_header"], + [SCISetting switchCellWithTitle:@"Hide repost button" subtitle:@"Hides the repost button on the reels sidebar" defaultsKey:@"hide_reels_repost"] ] }, @{ diff --git a/src/Tweak.x b/src/Tweak.x index b0ce149..5f404bc 100644 --- a/src/Tweak.x +++ b/src/Tweak.x @@ -692,6 +692,7 @@ shouldPersistLastBugReportId:(id)arg6 } - (void)_didTapRepostButton { + if ([SCIUtils getBoolPref:@"hide_reels_repost"]) return; if ([SCIUtils getBoolPref:@"repost_confirm"]) { [SCIUtils showConfirmation:^(void) { %orig; }]; } @@ -701,11 +702,20 @@ shouldPersistLastBugReportId:(id)arg6 } - (void)_didLongPressRepostButton:(id)arg1 { + if ([SCIUtils getBoolPref:@"hide_reels_repost"]) return; if ([SCIUtils getBoolPref:@"repost_confirm"]) return; %orig; } %end +// Hide repost button at the view model level so IG's layout handles the gap +%hook IGSundialViewerUFIViewModel +- (BOOL)shouldShowRepostButton { + if ([SCIUtils getBoolPref:@"hide_reels_repost"]) return NO; + return %orig; +} +%end + ///////////////////////////////////////////////////////////////////////////// // FLEX explorer gesture handler