Skip to content

Commit

Permalink
RomDownloaderManager bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamLCobb committed Dec 31, 2015
1 parent cba331f commit e714ef6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion iNDS/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceAppl
[foundItems addObject:path.lastPathComponent];
} else {
NSLog(@"Discarding: %@", path);
[[NSFileManager defaultManager] removeItemAtPath:[dstDir stringByAppendingPathComponent:path] error:NULL];
}
[[NSFileManager defaultManager] removeItemAtPath:[dstDir stringByAppendingPathComponent:path] error:NULL];
}
if (foundItems.count == 0) {
[self showError:@"No roms or saves found in archive."];
Expand Down
3 changes: 2 additions & 1 deletion iNDS/iNDSRomDownloadManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ - (void) connectionDidFinishLoading:(NSURLConnection *)connection {
[UIApplication sharedApplication].networkActivityIndicatorVisible = NO;

dispatch_async(dispatch_get_main_queue(), ^{
self.progressLabel.text = [NSString stringWithFormat:@"Opening"];
if (self.progressLabel)
self.progressLabel.text = [NSString stringWithFormat:@"Opening"];
});
NSError * error;

Expand Down
4 changes: 3 additions & 1 deletion iNDS/roms/iNDSROMTableViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,9 @@ - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell"];
UITableViewCell *cell;
if (indexPath.section == 0) { // Game
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"iNDSGame"];
if (indexPath.row >= games.count) return [UITableViewCell new];
iNDSGame *game = games[indexPath.row];
if (game.gameTitle) {
Expand All @@ -145,6 +146,7 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
cell.imageView.image = game.icon;
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
} else { //Download
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"iNDSDownload"];
if (indexPath.row >= activeDownloads.count) return [UITableViewCell new];
iNDSRomDownload * download = activeDownloads[indexPath.row];
cell.textLabel.text = download.name;
Expand Down

0 comments on commit e714ef6

Please sign in to comment.