Skip to content

Commit

Permalink
feat: improve remove screenshot alert functionality to be more reliable
Browse files Browse the repository at this point in the history
  • Loading branch information
SoCuul committed Mar 31, 2024
1 parent 8e5590c commit dd58fcc
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion src/Tweak.x
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ static BOOL isAuthenticationShowed = FALSE;
%end


// Instagram DM visual messages
// Instagram DM visual messages / IG stories
%hook IGDirectVisualMessageViewerSession
- (id)visualMessageViewerController:(id)arg1 didDetectScreenshotForVisualMessage:(id)arg2 atIndex:(NSInteger)arg3 {
if ([BHIManager noScreenShotAlert]) {
Expand Down Expand Up @@ -128,6 +128,30 @@ static BOOL isAuthenticationShowed = FALSE;
return %orig;
}
%end
%hook IGDirectVisualMessageViewerController
- (void)screenshotObserverDidSeeScreenshotTaken:(id)arg1 {
if ([BHIManager noScreenShotAlert]) {
return;
}
return %orig;
}
- (void)screenshotObserverDidSeeActiveScreenCapture:(id)arg1 event:(NSInteger)arg2 {
if ([BHIManager noScreenShotAlert]) {
return;
}
return %orig;
}
%end

// Instagram Screenshot Observer
%hook IGScreenshotObserver
- (id)initForController:(id)arg1 {
if ([BHIManager noScreenShotAlert]) {
return nil;
}
return %orig;
}
%end

// FLEX explorer gesture handler
%hook IGRootViewController
Expand Down

0 comments on commit dd58fcc

Please sign in to comment.