]> git.saurik.com Git - cydia.git/commitdiff
Spinner when closing Role controller. The details matter.
authorGrant Paul <chpwn@chpwn.com>
Wed, 17 Nov 2010 01:16:43 +0000 (17:16 -0800)
committerGrant Paul <chpwn@chpwn.com>
Wed, 17 Nov 2010 01:16:43 +0000 (17:16 -0800)
MobileCydia.mm

index 6947ff5d87a2ad72a7ead6019d6ca96c110479ca..d9b1466fbe3f213b55a4e9292811415ee070c4fc 100644 (file)
@@ -7555,11 +7555,22 @@ freeing the view controllers on tab change */
     [self showDoneButton];
 }
 
-- (void) doneButtonClicked {
+- (void) saveAndClose {
     [self save];
+
+    [[self navigationItem] setRightBarButtonItem:nil];
     [[self navigationController] dismissModalViewControllerAnimated:YES];
 }
 
+- (void) doneButtonClicked {
+    UIActivityIndicatorView *spinner = [[[UIActivityIndicatorView alloc] initWithFrame:CGRectMake(0, 0, 20.0f, 20.0f)] autorelease];
+    [spinner startAnimating];
+    UIBarButtonItem *spinItem = [[[UIBarButtonItem alloc] initWithCustomView:spinner] autorelease];
+    [[self navigationItem] setRightBarButtonItem:spinItem];
+
+    [self performSelector:@selector(saveAndClose) withObject:nil afterDelay:0];
+}
+
 - (void) showDoneButton {
     UIBarButtonItem *rightItem = [[UIBarButtonItem alloc]
         initWithTitle:UCLocalize("DONE")