forked from BandarHL/BHInstagram
-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: hide trending searches crashing with meta ai search
- Loading branch information
Showing
1 changed file
with
9 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,16 @@ | ||
#import "../../InstagramHeaders.h" | ||
#import "../../Manager.h" | ||
|
||
%hook IGKeywordSearchModel | ||
- (id)initWithPk:(id)arg1 name:(id)arg2 score:(id)arg3 subtitle:(id)arg4 isPopular:(BOOL)arg5 isMetaAISuggestion:(BOOL)arg6 { | ||
if ([SCIManager hideTrendingSearches]) { | ||
NSLog(@"[SCInsta] Hiding trending searches"); | ||
%hook IGDSSegmentedPillBarView | ||
- (void)didMoveToWindow { | ||
%orig; | ||
|
||
return nil; | ||
} | ||
|
||
return %orig; | ||
} | ||
- (id)initWithDictionary:(id)arg1 { | ||
if ([SCIManager hideTrendingSearches]) { | ||
NSLog(@"[SCInsta] 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 ([SCIManager hideTrendingSearches]) { | ||
NSLog(@"[SCInsta] Hiding trending searches"); | ||
if ([[self delegate] isKindOfClass:%c(IGSearchTypeaheadNavigationHeaderView)]) { | ||
if ([SCIManager hideTrendingSearches]) { | ||
NSLog(@"[SCInsta] Hiding trending searches"); | ||
|
||
return nil; | ||
[self removeFromSuperview]; | ||
} | ||
} | ||
return %orig; | ||
} | ||
%end */ | ||
%end |