Skip to content

Commit

Permalink
feat: hide newer suggested threads posts in feed
Browse files Browse the repository at this point in the history
  • Loading branch information
SoCuul committed Jun 28, 2024
1 parent 7668534 commit 581418c
Showing 1 changed file with 33 additions and 1 deletion.
34 changes: 33 additions & 1 deletion src/Features/Feed/HideFeedItems.x
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ static NSArray *removeAdsItemsInList(NSArray *list, BOOL isFeed) {

// Remove suggested threads posts (carousel)
if (isFeed && [SCIManager removeSuggestedThreads]) {
if ([obj isKindOfClass:%c(IGBloksFeedUnitModel)]) {
if ([obj isKindOfClass:%c(IGBloksFeedUnitModel)] || [obj isKindOfClass:objc_getClass("IGThreadsInFeedModels.IGThreadsInFeedModel")]) {
NSLog(@"[SCInsta] Hiding threads posts");

[orig removeObjectAtIndex:idx];
Expand Down Expand Up @@ -186,3 +186,35 @@ static NSArray *removeAdsItemsInList(NSArray *list, BOOL isFeed) {
return %orig;
}
%end

// End of feed item
/* !! WIP: make sure to fix */
/* !! */
/* !! */
%hook IGEndOfFeedDemarcatorModel
- (id)initWithIdentifier:(id)arg1
title:(id)title
subtitle:(id)arg3
style:(NSInteger)arg4
interactionStyle:(NSInteger)arg5
backgroundColor:(id)arg6
groupSet:(id)arg7
group:(id)arg8
expandBottomMargin:(BOOL)arg9
viewStateItemType:(NSUInteger)arg10
demarcatorType:(NSInteger)arg11
actionConfig:(id)arg12
brandSafetySeverity:(id)arg13
{
if ([SCIManager removeSuggestedPost]) {
NSLog(@"[SCInsta] Hiding end of feed message");

// Hide suggested for you text
title = @"";

return %orig(arg1, title, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13);
}

return %orig;
}
%end

0 comments on commit 581418c

Please sign in to comment.