diff --git a/src/Features/General/HideMetaAI.xm b/src/Features/General/HideMetaAI.xm index cb32d08..88275d9 100644 --- a/src/Features/General/HideMetaAI.xm +++ b/src/Features/General/HideMetaAI.xm @@ -123,7 +123,7 @@ accessibilityTraits:(NSUInteger)arg5 // Explore -// Meta AI search bar: explore search results data +// Meta AI search bar: explore/user search results data %hook IGSearchListKitDataSource - (id)objectsForListAdapter:(id)arg1 { NSMutableArray *newObjs = [%orig mutableCopy]; @@ -159,6 +159,15 @@ accessibilityTraits:(NSUInteger)arg5 } + // Meta AI user account in search results + else if ([[[obj title] string] isEqualToString:@"meta.ai"]) { + if ([SCIManager hideMetaAI]) { + NSLog(@"[SCInsta] Hiding meta ai: explore search results meta ai user account suggestion"); + + [newObjs removeObjectAtIndex:idx]; + } + } + } }]; @@ -234,6 +243,19 @@ accessibilityTraits:(NSUInteger)arg5 } %end +// Search bar donut button +%hook IGSearchBarDonutButton +- (void)didMoveToWindow { + %orig; + + if ([SCIManager hideMetaAI]) { + NSLog(@"[SCInsta] Hiding meta ai: search bar donut button"); + + [self removeFromSuperview]; + } +} +%end + // Search typeahead %hook IGSearchTypeaheadViewController - (void)_presentMetaAIThreadWithDirectEntryPoint:(NSInteger)arg1 searchEntryPoint:(NSInteger)arg2 prompt:(id)arg3 { diff --git a/src/InstagramHeaders.h b/src/InstagramHeaders.h index 705b8c7..f0618fa 100644 --- a/src/InstagramHeaders.h +++ b/src/InstagramHeaders.h @@ -276,7 +276,15 @@ - (id)labelTitle; @end +@interface IGDirectInboxSuggestedThreadCellViewModel : NSObject +@end + +@interface IGDirectInboxHeaderCellViewModel : NSObject +- (id)title; +@end + @interface IGSearchResultViewModel : NSObject +- (id)title; - (NSUInteger)itemType; @end @@ -297,16 +305,19 @@ - (id)delegate; @end -@interface IGBadgedNavigationButton : UIView -- (id)initWithIcon:(UIImage *)icon target:(id)target action:(SEL)action buttonType:(NSUInteger)buttonType; -- (void)handleLongPress; // new +@interface IGImageWithAccessoryButton : IGTapButton +@end + +@interface IGSearchBarDonutButton : UIView @end -@interface IGImageWithAccessoryButton : IGTapButton +@interface IGAnimatablePlaceholderTextField : UITextField @end + + /////////////////////////////////////////////////////////////////////////////