diff --git a/src/Controllers/SettingsViewController.m b/src/Controllers/SettingsViewController.m index debca2a..4cb63cf 100755 --- a/src/Controllers/SettingsViewController.m +++ b/src/Controllers/SettingsViewController.m @@ -101,6 +101,7 @@ - (NSArray *)specifiers { [self newSwitchCellWithTitle:@"Hide explore posts grid" detailTitle:@"Hides the grid of suggested posts on the explore/search tab" key:@"hide_explore_grid" defaultValue:false changeAction:nil], [self newSwitchCellWithTitle:@"Hide trending searches" detailTitle:@"Hides the trending searches under the explore search bar" key:@"hide_trending_searches" defaultValue:true changeAction:nil], [self newSwitchCellWithTitle:@"No suggested chats" detailTitle:@"Hides the suggested broadcast channels in direct messages" key:@"no_suggested_chats" defaultValue:true changeAction:nil], + [self newSwitchCellWithTitle:@"No suggested users" detailTitle:@"Hides the suggested users for you to follow" key:@"no_suggested_users" defaultValue:false changeAction:nil], // Section 2: Feed [self newSectionWithTitle:@"Feed" footer:nil], diff --git a/src/Features/General/NoSuggestedUsers.x b/src/Features/General/NoSuggestedUsers.x new file mode 100644 index 0000000..985f329 --- /dev/null +++ b/src/Features/General/NoSuggestedUsers.x @@ -0,0 +1,15 @@ +#import "../../InstagramHeaders.h" +#import "../../Manager.h" + +// "Welcome to instagram" suggested users in feed +%hook IGSuggestedUnitViewModel +- (id)initWithAYMFModel:(id)arg1 headerViewModel:(id)arg2 { + if ([SCIManager noSuggestedUsers]) { + NSLog(@"[SCInsta] Hiding suggested users: main feed welcome section"); + + return nil; + } + + return %orig; +} +%end \ No newline at end of file diff --git a/src/Manager.h b/src/Manager.h index 17e358b..9b27f67 100644 --- a/src/Manager.h +++ b/src/Manager.h @@ -24,6 +24,7 @@ + (BOOL)hideExploreGrid; + (BOOL)hideTrendingSearches; + (BOOL)noSuggestedChats; ++ (BOOL)noSuggestedUsers; + (BOOL)hideMetaAI; + (BOOL)Padlock; + (BOOL)keepDeletedMessage; diff --git a/src/Manager.m b/src/Manager.m index a52e47b..d977d04 100644 --- a/src/Manager.m +++ b/src/Manager.m @@ -65,6 +65,9 @@ + (BOOL)hideTrendingSearches { + (BOOL)noSuggestedChats { return [[NSUserDefaults standardUserDefaults] boolForKey:@"no_suggested_chats"]; } ++ (BOOL)noSuggestedUsers { + return [[NSUserDefaults standardUserDefaults] boolForKey:@"no_suggested_users"]; +} + (BOOL)hideMetaAI { return [[NSUserDefaults standardUserDefaults] boolForKey:@"hide_meta_ai"]; }