]> git.saurik.com Git - cydia.git/commitdiff
Allow BrowserView subclasses to be notified of changes in loading state.
authorGrant Paul <chpwn@chpwn.com>
Wed, 29 Dec 2010 06:05:59 +0000 (22:05 -0800)
committerGrant Paul <chpwn@chpwn.com>
Wed, 29 Dec 2010 06:05:59 +0000 (22:05 -0800)
UICaboodle/BrowserView.mm

index f1053f85e65f5c5fa76185f6c4900ca510adb104..168cff1b0613324ee404b3665f607ffc3629b4b2 100644 (file)
@@ -904,24 +904,33 @@ static void $UIWebViewWebViewDelegate$webViewClose$(UIWebViewWebViewDelegate *se
     }
 }
 
+- (void) didStartLoading {
+    // Overridden in subclasses.
+}
+
 - (void) _didStartLoading {
     [self applyRightButton];
 
     if ([loading_ count] != 1)
         return;
+
     [delegate_ retainNetworkActivityIndicator];
+    [self didStartLoading];
+}
+
+- (void) didFinishLoading {
+    // Overridden in subclasses.
 }
 
 - (void) _didFinishLoading {
     if ([loading_ count] != 0)
         return;
-    [delegate_ releaseNetworkActivityIndicator];
 
     [self applyRightButton];
+    [[self navigationItem] setTitle:title_];
 
-    // XXX: wtf?
-    if (![self isLoading])
-        [[self navigationItem] setTitle:title_];
+    [delegate_ releaseNetworkActivityIndicator];
+    [self didFinishLoading];
 }
 
 - (bool) isLoading {