浏览代码

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