From 7486f6e52b660d8123e4cd7d033804b286b0f33e Mon Sep 17 00:00:00 2001 From: iCrazeiOS <39101269+iCrazeiOS@users.noreply.github.com> Date: Fri, 1 Dec 2023 03:16:37 +0000 Subject: [PATCH] add "Show in Filza" button --- TDUtils.m | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/TDUtils.m b/TDUtils.m index c907ab7..443cd47 100644 --- a/TDUtils.m +++ b/TDUtils.m @@ -225,14 +225,24 @@ void bfinject_rocknroll(pid_t pid, NSString *appName, NSString *version) { [alertController dismissViewControllerAnimated:NO completion:nil]; doneController = [UIAlertController alertControllerWithTitle:@"Decryption Complete!" message:[NSString stringWithFormat:@"IPA file saved to:\n%@", [dd IPAPath]] preferredStyle:UIAlertControllerStyleAlert]; + UIAlertAction *okAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"Ok", @"Ok") style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) { - NSLog(@"[trolldecrypt] Ok action"); - [doneController dismissViewControllerAnimated:NO completion:nil]; [kw removeFromSuperview]; kw.hidden = YES; }]; - [doneController addAction:okAction]; + + if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"filza://"]]) { + UIAlertAction *openAction = [UIAlertAction actionWithTitle:@"Show in Filza" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) { + [kw removeFromSuperview]; + kw.hidden = YES; + + NSString *urlString = [NSString stringWithFormat:@"filza://view%@", [dd IPAPath]]; + [[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlString] options:@{} completionHandler:nil]; + }]; + [doneController addAction:openAction]; + } + [root presentViewController:doneController animated:YES completion:nil]; }); // dispatch on main