Skip to content

Commit

Permalink
fix: only remove pills under explore search bar
Browse files Browse the repository at this point in the history
  • Loading branch information
SoCuul committed Apr 7, 2024
1 parent abb14a6 commit 7c7c48e
Showing 1 changed file with 25 additions and 4 deletions.
29 changes: 25 additions & 4 deletions src/Features/General/HideTrendingSearches.x
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
#import "../../InstagramHeaders.h"
#import "../../Manager.h"

// !! Bug: Currently hides all pill icons within the Instagram app. Instead, only hide "topic" pills.
%hook IGDSSegmentedPillControl
+ (id)newWithStyle:(id)arg1 {
%hook IGKeywordSearchModel
- (id)initWithPk:(id)arg1 name:(id)arg2 score:(id)arg3 subtitle:(id)arg4 isPopular:(BOOL)arg5 isMetaAISuggestion:(BOOL)arg6 {
if ([BHIManager hideTrendingSearches]) {
NSLog(@"[BHInsta] Hiding trending searches");

Expand All @@ -12,4 +11,26 @@

return %orig;
}
%end
- (id)initWithDictionary:(id)arg1 {
if ([BHIManager hideTrendingSearches]) {
NSLog(@"[BHInsta] Hiding trending searches");

return nil;
}

return %orig;
}
%end

// Maybe try something like this to hide reccomended search text?
/* %hook IGAnimatablePlaceholderModel
- (id)initWithId:(id)arg1 placeholderText:(id)arg2 placeholderName:(id)arg3 placeholderType:(id)arg4 {
if ([BHIManager hideTrendingSearches]) {
NSLog(@"[BHInsta] Hiding trending searches");
return nil;
}
return %orig;
}
%end */

0 comments on commit 7c7c48e

Please sign in to comment.