Commit 75c10404 authored by Carola's avatar Carola
Browse files

VLCOneDrive: fix tvOS build

UIAlertView is not available on tvOS so we need to use the UIAlertController instead

(cherry picked from commit 163896a4)
parent 96a7a81e
...@@ -216,12 +216,16 @@ ...@@ -216,12 +216,16 @@
} }
[receivedSub writeToFile:FileSubtitlePath atomically:YES]; [receivedSub writeToFile:FileSubtitlePath atomically:YES];
} else { } else {
VLCAlertView *alert = [[VLCAlertView alloc] initWithTitle:NSLocalizedString(@"DISK_FULL", nil) UIAlertController *alertController = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"DISK_FULL", nil)
message:[NSString stringWithFormat:NSLocalizedString(@"DISK_FULL_FORMAT", nil), [subtitleURL lastPathComponent], [[UIDevice currentDevice] model]] message:[NSString stringWithFormat:NSLocalizedString(@"DISK_FULL_FORMAT", nil), [subtitleURL lastPathComponent], [[UIDevice currentDevice] model]]
delegate:self preferredStyle:UIAlertControllerStyleAlert];
cancelButtonTitle:NSLocalizedString(@"BUTTON_OK", nil)
otherButtonTitles:nil]; UIAlertAction *okAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"BUTTON_OK", nil)
[alert show]; style:UIAlertActionStyleCancel
handler:nil];
[alertController addAction:okAction];
[[UIApplication sharedApplication].keyWindow.rootViewController presentViewController:alertController animated:YES completion:nil];
} }
return FileSubtitlePath; return FileSubtitlePath;
......
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