Browse Source

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

Felix Paul Kühne 12 years ago
parent
commit
61687d2f4f

+ 1 - 0
AspenProject/VLCAddMediaViewController.h

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

+ 4 - 0
AspenProject/VLCHTTPFileDownloader.m

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