Skip to content

Commit

Permalink
Merge pull request #25 from xNaifDev/main
Browse files Browse the repository at this point in the history
Adding Some little Features
  • Loading branch information
BandarHL authored Feb 10, 2024
2 parents e5422cf + 700db88 commit d9841f9
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 2 deletions.
2 changes: 2 additions & 0 deletions BHIManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
+ (BOOL)removeSuggestedPost;
+ (BOOL)showLikeCount;
+ (BOOL)likeConfirmation;
+ (BOOL)followConfirmation;
+ (BOOL)copyDecription;
+ (BOOL)copyBio;
+ (BOOL)Padlock;
+ (BOOL)keepDeletedMessage;
+ (BOOL)hideLastSeen;
Expand Down
6 changes: 6 additions & 0 deletions BHIManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -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"];
}
Expand Down
7 changes: 7 additions & 0 deletions InstagramHeaders.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
TARGET := iphone:clang:latest:13.0
TARGET := iphone:clang:13.7
INSTALL_TARGET_PROCESSES = SpringBoard


Expand Down
5 changes: 4 additions & 1 deletion SettingsViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];

Expand All @@ -122,7 +123,9 @@ - (NSArray *)specifiers {
noSuggestedPost,
showLikeCount,
likeConfirmation,
followConfirmation,
copyDecription,
copyBio,

mediaSection, // 2
downloadVid,
Expand Down
54 changes: 54 additions & 0 deletions Tweak.x
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit d9841f9

Please sign in to comment.