Skip to content

Commit

Permalink
Feat: No suggested threads posts
Browse files Browse the repository at this point in the history
  • Loading branch information
SoCuul committed Mar 4, 2024
1 parent 87b90e6 commit b8fd970
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Controllers/SettingsViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ - (NSArray *)specifiers {
[self newSwitchCellWithTitle:@"No suggested posts" detailTitle:@"Remove suggested posts from your feed" key:@"no_suggested_post" defaultValue:false changeAction:nil],
[self newSwitchCellWithTitle:@"No suggested for you" detailTitle:@"Hide suggested accounts for you to follow" key:@"no_suggested_account" defaultValue:false changeAction:nil],
//[self newSwitchCellWithTitle:@"No suggested reels" detailTitle:@"Hide suggested reels to watch" key:@"no_suggested_reels" defaultValue:false changeAction:nil],
[self newSwitchCellWithTitle:@"No suggested threads posts" detailTitle:@"Hide suggested threads posts" key:@"no_suggested_threads" defaultValue:true changeAction:nil],

// Section 3: Confirm actions
[self newSectionWithTitle:@"Confirm actions" footer:nil],
Expand Down
1 change: 0 additions & 1 deletion src/Features/Feed/HideThreads

This file was deleted.

12 changes: 12 additions & 0 deletions src/Features/Feed/HideThreads.x
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#import "../../InstagramHeaders.h"
#import "../../Manager.h"

// Remove suggested threads posts (carousel, under suggested posts in feed)
%hook BKBloksViewHelper
- (id)initWithObjectSet:(id)arg1 bloksData:(id)arg2 delegate:(id)arg3 {
if ([BHIManager removeSuggestedThreads]) {
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 @@ -9,6 +9,7 @@
+ (BOOL)removeSuggestedPost;
+ (BOOL)removeSuggestedAccounts;
+ (BOOL)removeSuggestedReels;
+ (BOOL)removeSuggestedThreads;
+ (BOOL)showLikeCount;
+ (BOOL)postLikeConfirmation;
+ (BOOL)reelsLikeConfirmation;
Expand Down
3 changes: 3 additions & 0 deletions src/Manager.m
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ + (BOOL)removeSuggestedAccounts {
+ (BOOL)removeSuggestedReels {
return [[NSUserDefaults standardUserDefaults] boolForKey:@"no_suggested_reels"];
}
+ (BOOL)removeSuggestedThreads {
return [[NSUserDefaults standardUserDefaults] boolForKey:@"no_suggested_threads"];
}
+ (BOOL)showLikeCount {
return [[NSUserDefaults standardUserDefaults] boolForKey:@"show_like_count"];
}
Expand Down
1 change: 1 addition & 0 deletions src/Tweak.x
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ BOOL dmVisualMsgsViewedButtonEnabled = false;
[[NSUserDefaults standardUserDefaults] setBool:true forKey:@"copy_description"];
[[NSUserDefaults standardUserDefaults] setBool:true forKey:@"call_confirm"];
[[NSUserDefaults standardUserDefaults] setBool:true forKey:@"hide_trending_searches"];
[[NSUserDefaults standardUserDefaults] setBool:true forKey:@"no_suggested_threads"];

// Display settings modal on screen
UIViewController *rootController = [[self window] rootViewController];
Expand Down

0 comments on commit b8fd970

Please sign in to comment.