]> git.saurik.com Git - cydia.git/commitdiff
Fix 'resubmit form' dialog: new alert API crash.
authorJay Freeman (saurik) <saurik@saurik.com>
Tue, 7 Dec 2010 10:15:37 +0000 (02:15 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Sat, 1 Jan 2011 22:32:06 +0000 (14:32 -0800)
UICaboodle/BrowserView.mm

index 168cff1b0613324ee404b3665f607ffc3629b4b2..1017496e4e15a2f6c35b276633f7ef67cad00985 100644 (file)
@@ -837,19 +837,13 @@ static void $UIWebViewWebViewDelegate$webViewClose$(UIWebViewWebViewDelegate *se
 
         [alert dismissWithClickedButtonIndex:-1 animated:YES];
     } else if ([context isEqualToString:@"submit"]) {
-        switch (button) {
-            case 1:
-            break;
-
-            case 2:
-                if (request_ != nil) {
-                    WebThreadLock();
-                    [webview_ loadRequest:request_];
-                    WebThreadUnlock();
-                }
-            break;
-
-            _nodefault
+        if (button == [alert cancelButtonIndex]) {
+        } else if (button == [alert firstOtherButtonIndex]) {
+            if (request_ != nil) {
+                WebThreadLock();
+                [webview_ loadRequest:request_];
+                WebThreadUnlock();
+            }
         }
 
         [alert dismissWithClickedButtonIndex:-1 animated:YES];