소스 검색

collaps add media view controller when download is complete, if the user hasn't already done so

Felix Paul Kühne 12 년 전
부모
커밋
61687d2f4f
2개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      AspenProject/VLCAddMediaViewController.h
  2. 4 0
      AspenProject/VLCHTTPFileDownloader.m

+ 1 - 0
AspenProject/VLCAddMediaViewController.h

@@ -28,6 +28,7 @@
 @property (strong, nonatomic) IBOutlet UITextField *openURLField;
 @property (strong, nonatomic) IBOutlet UIButton *openURLButton;
 
+- (IBAction)dismiss:(id)sender;
 - (IBAction)openAboutPanel:(id)sender;
 - (IBAction)openNetworkStream:(id)sender;
 - (IBAction)downloadFromHTTPServer:(id)sender;

+ 4 - 0
AspenProject/VLCHTTPFileDownloader.m

@@ -85,12 +85,16 @@
 
     VLCAppDelegate * appDelegate = [UIApplication sharedApplication].delegate;
     [appDelegate updateMediaList];
+
+    [_mediaViewController dismiss:nil];
 }
 
 -(void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error {
     APLog(@"http file download failed (%i)", error.code);
     _downloadInProgress = NO;
     _progressIndicator.hidden = YES;
+
+    [_mediaViewController dismiss:nil];
 }
 
 @end