Commit 2e1c3cc5 authored by Felix Paul Kühne's avatar Felix Paul Kühne
Browse files

Download Controller: fix download queue action if view was never shown

parent 77fd9eab
...@@ -32,10 +32,18 @@ ...@@ -32,10 +32,18 @@
@implementation VLCDownloadViewController @implementation VLCDownloadViewController
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self)
_currentDownloads = [[NSMutableArray alloc] init];
return self;
}
- (void)viewDidLoad - (void)viewDidLoad
{ {
[self.downloadButton setTitle:NSLocalizedString(@"BUTTON_DOWNLOAD",@"") forState:UIControlStateNormal]; [self.downloadButton setTitle:NSLocalizedString(@"BUTTON_DOWNLOAD",@"") forState:UIControlStateNormal];
_currentDownloads = [[NSMutableArray alloc] init];
self.navigationItem.leftBarButtonItem = [UIBarButtonItem themedRevealMenuButtonWithTarget:self andSelector:@selector(goBack:)]; self.navigationItem.leftBarButtonItem = [UIBarButtonItem themedRevealMenuButtonWithTarget:self andSelector:@selector(goBack:)];
self.title = NSLocalizedString(@"DOWNLOAD_FROM_HTTP", @""); self.title = NSLocalizedString(@"DOWNLOAD_FROM_HTTP", @"");
self.whatToDownloadHelpLabel.text = [NSString stringWithFormat:NSLocalizedString(@"DOWNLOAD_FROM_HTTP_HELP", @""), [[UIDevice currentDevice] model]]; self.whatToDownloadHelpLabel.text = [NSString stringWithFormat:NSLocalizedString(@"DOWNLOAD_FROM_HTTP_HELP", @""), [[UIDevice currentDevice] model]];
...@@ -265,6 +273,7 @@ ...@@ -265,6 +273,7 @@
- (void)addURLToDownloadList:(NSURL *)aURL - (void)addURLToDownloadList:(NSURL *)aURL
{ {
[_currentDownloads addObject:aURL]; [_currentDownloads addObject:aURL];
[self.downloadsTable reloadData];
[self _triggerNextDownload]; [self _triggerNextDownload];
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment