@@ -28,7 +28,7 @@ - (void)viewDidLoad
2828 CGSize size = CGSizeMake (self.view .frame .size .width , self.view .frame .size .height );
2929 insets = UIApplication.sharedApplication .windows .firstObject .safeAreaInsets ;
3030
31- NSURLRequest *request = [NSURLRequest requestWithURL: [NSURL URLWithString: @" https://angelauramc.dev/wiki /changelogs/IOS.html" ]];
31+ NSURLRequest *request = [NSURLRequest requestWithURL: [NSURL URLWithString: @" https://wiki. angelauramc.dev/patchnotes /changelogs/IOS.html" ]];
3232
3333 WKWebViewConfiguration *webConfig = [[WKWebViewConfiguration alloc ] init ];
3434 webView = [[WKWebView alloc ] initWithFrame: self .view.frame configuration: webConfig];
@@ -47,25 +47,31 @@ - (void)viewDidLoad
4747
4848 if (!isJailbroken && getPrefBool (@" warnings.limited_ram_warn" ) && (roundf (NSProcessInfo .processInfo .physicalMemory / 0x1000000 ) < 3900 )) {
4949 // "This device has a limited amount of memory available."
50- [self showWarningAlert: @" limited_ram" hasPreference: YES ];
50+ [self showWarningAlert: @" limited_ram" hasPreference: YES exitWhenCompleted: NO ];
5151 }
5252
5353 self.navigationItem .leftBarButtonItem = self.splitViewController .displayModeButtonItem ;
5454 self.navigationItem .rightBarButtonItem = [sidebarViewController drawAccountButton ];
5555 self.navigationItem .leftItemsSupplementBackButton = true ;
5656}
5757
58- -(void )showWarningAlert : (NSString *)key hasPreference : (BOOL )isPreferenced {
58+ -(void )showWarningAlert : (NSString *)key hasPreference : (BOOL )isPreferenced exitWhenCompleted : ( BOOL ) shouldExit {
5959 UIAlertController *warning = [UIAlertController
6060 alertControllerWithTitle: localize ([NSString stringWithFormat: @" login.warn.title.%@ " , key], nil )
61- message: localize ([NSString stringWithFormat: @" login.warn.title .%@ " , key], nil )
61+ message: localize ([NSString stringWithFormat: @" login.warn.message .%@ " , key], nil )
6262 preferredStyle: UIAlertControllerStyleAlert];
6363
6464 UIAlertAction *action;
6565 if (isPreferenced) {
6666 action = [UIAlertAction actionWithTitle: localize (@" OK" , nil ) style: UIAlertActionStyleDestructive handler: ^(UIAlertAction * action) {
6767 setPrefBool ([NSString stringWithFormat: @" warnings.%@ _warn" , key], NO );
6868 }];
69+ } else if (shouldExit) {
70+ action = [UIAlertAction actionWithTitle: localize (@" OK" , nil ) style: UIAlertActionStyleDestructive handler: ^(UIAlertAction * action) {
71+ [UIApplication.sharedApplication performSelector: @selector (suspend )];
72+ usleep (100 *1000 );
73+ exit (0 );
74+ }];
6975 } else {
7076 action = [UIAlertAction actionWithTitle: localize (@" OK" , nil ) style: UIAlertActionStyleCancel handler: nil ];
7177 }
0 commit comments