From: Grant Paul Date: Wed, 29 Dec 2010 06:05:59 +0000 (-0800) Subject: Allow BrowserView subclasses to be notified of changes in loading state. X-Git-Tag: v1.1.0%b1~402 X-Git-Url: https://git.saurik.com/cydia.git/commitdiff_plain/df30fbeeffdde520154ea445b7ac9ff2c99ce198?ds=sidebyside;hp=9daa0bdcb0426353ff2ac7c25af05aae36fc434f Allow BrowserView subclasses to be notified of changes in loading state. --- diff --git a/UICaboodle/BrowserView.mm b/UICaboodle/BrowserView.mm index f1053f85..168cff1b 100644 --- a/UICaboodle/BrowserView.mm +++ b/UICaboodle/BrowserView.mm @@ -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 {