Skip to content

Commit

Permalink
feat: no suggested users to follow
Browse files Browse the repository at this point in the history
  • Loading branch information
SoCuul committed May 12, 2024
1 parent cd58135 commit 820d227
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Controllers/SettingsViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down
15 changes: 15 additions & 0 deletions src/Features/General/NoSuggestedUsers.x
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions src/Manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
+ (BOOL)hideExploreGrid;
+ (BOOL)hideTrendingSearches;
+ (BOOL)noSuggestedChats;
+ (BOOL)noSuggestedUsers;
+ (BOOL)hideMetaAI;
+ (BOOL)Padlock;
+ (BOOL)keepDeletedMessage;
Expand Down
3 changes: 3 additions & 0 deletions src/Manager.m
Original file line number Diff line number Diff line change
Expand Up @@ -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"];
}
Expand Down

0 comments on commit 820d227

Please sign in to comment.