From de3e13f60ad1d4c72537aca45a1fa9ba4b88a3db Mon Sep 17 00:00:00 2001 From: faroukbmiled Date: Fri, 10 Apr 2026 03:50:23 +0100 Subject: [PATCH] feat: Hide repost button in feed #2 --- README.md | 3 ++- src/Settings/TweakSettings.m | 11 ++++++----- src/Tweak.x | 14 ++++++++++++++ 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index c2d771d..ad29474 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # RyukGram A feature-rich iOS tweak for Instagram, forked from [SCInsta](https://github.com/SoCuul/SCInsta) with additional features and fixes.\ -`Version v1.1.4` | `Tested on Instagram 423.1.0` +`Version v1.1.4` | `Tested on Instagram 424.0.0` --- @@ -48,6 +48,7 @@ A feature-rich iOS tweak for Instagram, forked from [SCInsta](https://github.com - No suggested reels - No suggested threads posts - Disable video autoplay +- Hide repost button in feed **\*** ### Reels - Modify tap controls diff --git a/src/Settings/TweakSettings.m b/src/Settings/TweakSettings.m index ef44583..7000a98 100644 --- a/src/Settings/TweakSettings.m +++ b/src/Settings/TweakSettings.m @@ -84,7 +84,8 @@ [SCISetting switchCellWithTitle:@"No suggested for you" subtitle:@"Hides suggested accounts for you to follow" defaultsKey:@"no_suggested_account"], [SCISetting switchCellWithTitle:@"No suggested reels" subtitle:@"Hides suggested reels to watch" defaultsKey:@"no_suggested_reels"], [SCISetting switchCellWithTitle:@"No suggested threads posts" subtitle:@"Hides suggested threads posts" defaultsKey:@"no_suggested_threads"], - [SCISetting switchCellWithTitle:@"Disable video autoplay" subtitle:@"Prevents videos on your feed from playing automatically" defaultsKey:@"disable_feed_autoplay" requiresRestart:YES] + [SCISetting switchCellWithTitle:@"Disable video autoplay" subtitle:@"Prevents videos on your feed from playing automatically" defaultsKey:@"disable_feed_autoplay" requiresRestart:YES], + [SCISetting switchCellWithTitle:@"Hide repost button" subtitle:@"Hides the repost button on feed posts" defaultsKey:@"hide_feed_repost" requiresRestart:YES] ] }] ], @@ -105,7 +106,7 @@ @"header": @"Hiding", @"rows": @[ [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"] + [SCISetting switchCellWithTitle:@"Hide repost button" subtitle:@"Hides the repost button on the reels sidebar" defaultsKey:@"hide_reels_repost" requiresRestart:YES] ] }, @{ @@ -442,10 +443,10 @@ @{ @"header": @"Credits", @"rows": @[ - [SCISetting linkCellWithTitle:@"Original Developer" subtitle:@"SoCuul (SCInsta)" imageUrl:@"https://i.imgur.com/c9CbytZ.png" url:@"https://github.com/SoCuul/SCInsta"], - [SCISetting linkCellWithTitle:@"Modded by" subtitle:@"Ryuk" imageUrl:@"https://github.com/faroukbmiled.png" url:@"https://github.com/faroukbmiled"], + [SCISetting linkCellWithTitle:@"Ryuk" subtitle:@"Developer" imageUrl:@"https://github.com/faroukbmiled.png" url:@"https://github.com/faroukbmiled"], [SCISetting linkCellWithTitle:@"View Repo" subtitle:@"View the source code on GitHub" imageUrl:@"https://i.imgur.com/BBUNzeP.png" url:@"https://github.com/faroukbmiled/RyukGram"], - [SCISetting linkCellWithTitle:@"Donate to SCInsta dev" subtitle:@"Support SoCuul" icon:[SCISymbol symbolWithName:@"heart.circle.fill" color:[UIColor systemPinkColor] size:20.0] url:@"https://ko-fi.com/SoCuul"] + [SCISetting linkCellWithTitle:@"SoCuul" subtitle:@"Original SCInsta developer" imageUrl:@"https://i.imgur.com/c9CbytZ.png" url:@"https://github.com/SoCuul/SCInsta"], + [SCISetting linkCellWithTitle:@"Donate to SoCuul" subtitle:@"Support the original developer" icon:[SCISymbol symbolWithName:@"heart.circle.fill" color:[UIColor systemPinkColor] size:20.0] url:@"https://ko-fi.com/SoCuul"] ], @"footer": [NSString stringWithFormat:@"RyukGram %@\n\nInstagram v%@\n\nBased on SCInsta by SoCuul", SCIVersionString, [SCIUtils IGVersionString]] } diff --git a/src/Tweak.x b/src/Tweak.x index a2041ff..34685c5 100644 --- a/src/Tweak.x +++ b/src/Tweak.x @@ -68,6 +68,7 @@ BOOL dmVisualMsgsViewedButtonEnabled = false; @"story_seen_mode": @"button", @"story_audio_toggle": @(NO), @"settings_pause_playback": @(YES), + @"hide_feed_repost": @(NO), @"copy_comment": @(YES), @"download_gif_comment": @(YES) }; @@ -672,6 +673,19 @@ shouldPersistLastBugReportId:(id)arg6 } %end +// Hide repost button in feed (requires restart) +%hook IGUFIInteractionCountsView +- (void)updateUFIWithButtonsConfig:(id)config interactionCountProvider:(id)provider { + %orig; + if (![SCIUtils getBoolPref:@"hide_feed_repost"]) return; + Ivar rv = class_getInstanceVariable(object_getClass(self), "_repostView"); + if (rv) [object_getIvar((id)self, rv) setHidden:YES]; + Ivar uv = class_getInstanceVariable(object_getClass(self), "_undoRepostButton"); + if (uv) [object_getIvar((id)self, uv) setHidden:YES]; +} +%end + + %hook IGSundialViewerVerticalUFI - (void)_didTapLikeButton:(id)arg1 { if ([SCIUtils getBoolPref:@"like_confirm_reels"]) {