]> git.saurik.com Git - cydia.git/commitdiff
CyteKit: {retain,release}NetworkActivityIndicator.
authorJay Freeman (saurik) <saurik@saurik.com>
Tue, 7 Mar 2017 05:39:14 +0000 (21:39 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Tue, 7 Mar 2017 05:39:14 +0000 (21:39 -0800)
CyteKit/Application.h
CyteKit/Application.mm
MobileCydia.mm

index d95ad1cab31de81abeb955246118d3e1e06d8669..84355c1aba1b3d844acffa4111e8dc11d19bfd37 100644 (file)
@@ -28,6 +28,9 @@
 
 - (void) applicationDidFinishLaunching:(id)unused;
 
+- (void) retainNetworkActivityIndicator;
+- (void) releaseNetworkActivityIndicator;
+
 @end
 
 #endif//CyteKit_Application_H
index 77b1260cd3f8534e780c61ef5e51b844e04a39e0..025cbd797c23d76a920a79e11052ce8ff2d0974b 100644 (file)
@@ -30,7 +30,8 @@
 #include "iPhonePrivate.h"
 #include <Menes/ObjectHandle.h>
 
-@implementation CyteApplication : UIApplication {
+@implementation CyteApplication {
+    unsigned activity_;
 }
 
 - (void) _sendMemoryWarningNotification {
     ] autorelease]];
 }
 
+- (void) retainNetworkActivityIndicator {
+    if (activity_++ == 0)
+        [self setNetworkActivityIndicatorVisible:YES];
+
+#if TraceLogging
+    NSLog(@"retainNetworkActivityIndicator->%d", activity_);
+#endif
+}
+
+- (void) releaseNetworkActivityIndicator {
+    if (--activity_ == 0)
+        [self setNetworkActivityIndicatorVisible:NO];
+
+#if TraceLogging
+    NSLog(@"releaseNetworkActivityIndicator->%d", activity_);
+#endif
+}
+
 @end
index dce9dec8d415e5fa60c06f6a2a6067e6fc507202..e68810389989c42b21f8dd45d455bb46850144af 100644 (file)
@@ -8350,7 +8350,6 @@ static void HomeControllerReachabilityCallback(SCNetworkReachabilityRef reachabi
     _H<NSURL> starturl_;
 
     unsigned locked_;
-    unsigned activity_;
 
     _H<StashController> stash_;
 
@@ -8771,25 +8770,6 @@ _end
     [self unlockSuspend];
 }
 
-- (void) retainNetworkActivityIndicator {
-    if (activity_++ == 0)
-        [self setNetworkActivityIndicatorVisible:YES];
-
-#if TraceLogging
-    NSLog(@"retainNetworkActivityIndicator->%d", activity_);
-#endif
-}
-
-- (void) releaseNetworkActivityIndicator {
-    if (--activity_ == 0)
-        [self setNetworkActivityIndicatorVisible:NO];
-
-#if TraceLogging
-    NSLog(@"releaseNetworkActivityIndicator->%d", activity_);
-#endif
-
-}
-
 - (void) cancelAndClear:(bool)clear {
     @synchronized (self) {
         if (clear) {