Ver código fonte

HTTP-Uploader: show network activity indicator if appropriate

Felix Paul Kühne 12 anos atrás
pai
commit
287499732e
1 arquivos alterados com 2 adições e 0 exclusões
  1. 2 0
      AspenProject/VLCHTTPUploaderController.m

+ 2 - 0
AspenProject/VLCHTTPUploaderController.m

@@ -236,6 +236,7 @@ static const int httpLogLevel = HTTP_LOG_LEVEL_VERBOSE; // | HTTP_LOG_FLAG_TRACE
 		}
 		storeFile = [NSFileHandle fileHandleForWritingAtPath:filePath];
 		[uploadedFiles addObject: [NSString stringWithFormat:@"/upload/%@", filename]];
+        [UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
     }
 }
 
@@ -252,6 +253,7 @@ static const int httpLogLevel = HTTP_LOG_LEVEL_VERBOSE; // | HTTP_LOG_FLAG_TRACE
 	// as the file part is over, we close the file.
 	[storeFile closeFile];
 	storeFile = nil;
+    [UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
 
     /* update media library when file upload was completed */
     VLCAppDelegate* appDelegate = [UIApplication sharedApplication].delegate;