diff --git a/BHIManager.h b/BHIManager.h index de1d152..33b3eb5 100644 --- a/BHIManager.h +++ b/BHIManager.h @@ -8,7 +8,9 @@ + (BOOL)removeSuggestedPost; + (BOOL)showLikeCount; + (BOOL)likeConfirmation; ++ (BOOL)followConfirmation; + (BOOL)copyDecription; ++ (BOOL)copyBio; + (BOOL)Padlock; + (BOOL)keepDeletedMessage; + (BOOL)hideLastSeen; diff --git a/BHIManager.m b/BHIManager.m index 4f2378d..c7b4b04 100644 --- a/BHIManager.m +++ b/BHIManager.m @@ -20,9 +20,15 @@ + (BOOL)showLikeCount { + (BOOL)likeConfirmation { return [[NSUserDefaults standardUserDefaults] boolForKey:@"like_confirm"]; } ++ (BOOL)followConfirmation; { + return [[NSUserDefaults standardUserDefaults] boolForKey:@"follow_confirm"]; +} + (BOOL)copyDecription { return [[NSUserDefaults standardUserDefaults] boolForKey:@"copy_description"]; } ++ (BOOL)copyBio { + return [[NSUserDefaults standardUserDefaults] boolForKey:@"copy_bio"]; +} + (BOOL)Padlock { return [[NSUserDefaults standardUserDefaults] boolForKey:@"padlock"]; } diff --git a/InstagramHeaders.h b/InstagramHeaders.h index 8c47f4a..2676ae2 100644 --- a/InstagramHeaders.h +++ b/InstagramHeaders.h @@ -182,10 +182,17 @@ * For HD profile picture */ @interface IGUser : NSObject +@property NSInteger followStatus; @property(copy) NSString *username; @property BOOL followsCurrentUser; +@property NSString *biography; - (NSURL *)HDProfilePicURL; - (BOOL)isUser; + +@end + +@interface IGFollowController : NSObject +@property IGUser *user; @end @interface IGCoreTextView: UIView diff --git a/Makefile b/Makefile index 8e3d549..795158e 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -TARGET := iphone:clang:latest:13.0 +TARGET := iphone:clang:13.7 INSTALL_TARGET_PROCESSES = SpringBoard diff --git a/SettingsViewController.m b/SettingsViewController.m index 7b92e7e..f089cb9 100755 --- a/SettingsViewController.m +++ b/SettingsViewController.m @@ -98,8 +98,9 @@ - (NSArray *)specifiers { PSSpecifier *noSuggestedPost = [self newSwitchCellWithTitle:@"No suggested post" detailTitle:@"Remove suggested posts from the feed" key:@"no_suggested_post" defaultValue:false changeAction:nil]; PSSpecifier *showLikeCount = [self newSwitchCellWithTitle:@"Show Like count" detailTitle:@"Show like count in the post" key:@"show_like_count" defaultValue:true changeAction:nil]; PSSpecifier *likeConfirmation = [self newSwitchCellWithTitle:@"Confirm like" detailTitle:@"Show alert when you click the like button to confirm the like" key:@"like_confirm" defaultValue:false changeAction:nil]; + PSSpecifier *followConfirmation = [self newSwitchCellWithTitle:@"Confirm Follow" detailTitle:@"Show alert when you click the Follow button to confirm the Follow" key:@"follow_confirm" defaultValue:false changeAction:nil]; PSSpecifier *copyDecription = [self newSwitchCellWithTitle:@"Copy description" detailTitle:@"Copy the post description by long press" key:@"copy_description" defaultValue:true changeAction:nil]; - + PSSpecifier *copyBio = [self newSwitchCellWithTitle:@"Copy Profile Bio" detailTitle:@"Copy the Profile Bio by long press on Bio" key:@"copy_bio" defaultValue:true changeAction:nil]; PSSpecifier *downloadVid = [self newSwitchCellWithTitle:@"Download Videos" detailTitle:@"Download Videos by log press in any video you want." key:@"dw_videos" defaultValue:true changeAction:nil]; PSSpecifier *profileSave = [self newSwitchCellWithTitle:@"Save profile image" detailTitle:@"Save profile image by long press." key:@"save_profile" defaultValue:true changeAction:nil]; @@ -122,7 +123,9 @@ - (NSArray *)specifiers { noSuggestedPost, showLikeCount, likeConfirmation, + followConfirmation, copyDecription, + copyBio, mediaSection, // 2 downloadVid, diff --git a/Tweak.x b/Tweak.x index d3ab9dc..85297fb 100644 --- a/Tweak.x +++ b/Tweak.x @@ -218,6 +218,48 @@ static BOOL isAuthenticationShowed = FALSE; } } %end +// Copy Bio + +%hook IGProfileViewController + +-(void)bioSectionControllerDidLongPress:(id)arg1 { + if ([BHIManager copyBio]) { + IGProfileBioModel* bioModel = [self valueForKey:@"_bioModel"]; + NSString* biography = [[bioModel user] biography]; + UIAlertController *alert = [UIAlertController alertControllerWithTitle:nil message:@"HI" preferredStyle:UIAlertControllerStyleAlert]; + UIAlertAction* copyButton = [UIAlertAction actionWithTitle:@"Copy Bio" style:UIAlertActionStyleDefault + handler:^(UIAlertAction * action) { + + UIPasteboard *pasteboard = [UIPasteboard generalPasteboard]; + pasteboard.string = biography; + }]; + [alert addAction:copyButton]; + [self presentViewController:alert animated:YES completion:nil]; + } + return %orig; + + +} +%end + +// Follow Confirm + +%hook IGFollowController +-(void)_didPressFollowButton { + NSInteger UserFollowStatus = self.user.followStatus; + if ([BHIManager followConfirmation]) { + if (UserFollowStatus == 2){ + showConfirmation(^(void) { %orig; }); + }else { + %orig; + + } + }else { + return %orig; + } + +} +%end // like confirm %hook IGUFIButtonBarView @@ -281,6 +323,18 @@ static BOOL isAuthenticationShowed = FALSE; } } %end +// Like Confirm For Reels :) +%hook IGSundialViewerVerticalUFI +-(void)_didTapLikeButton:(id)arg1 { + if ([BHIManager likeConfirmation]) { + showConfirmation(^(void) { %orig; }); + } else { + return %orig; + } +} +%end + + // Hide Ads %hook IGMainFeedListAdapterDataSource