From 5ef91f2fc077c8e3d2afeae18a163474a5f63a5b Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Fri, 9 Jan 2015 17:25:18 -0500 Subject: [PATCH] Change app menu options to be clearer and more similar to Android --- Limelight/ViewControllers/MainFrameViewController.m | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Limelight/ViewControllers/MainFrameViewController.m b/Limelight/ViewControllers/MainFrameViewController.m index aa413e8..2d7e7ee 100644 --- a/Limelight/ViewControllers/MainFrameViewController.m +++ b/Limelight/ViewControllers/MainFrameViewController.m @@ -226,12 +226,16 @@ static StreamConfiguration* streamConfig; App* currentApp = [self findRunningApp]; if (currentApp != nil) { - UIAlertController* alertController = [UIAlertController alertControllerWithTitle:@"App Already Running" message:[NSString stringWithFormat:@"%@ is currently running", currentApp.appName] preferredStyle:UIAlertControllerStyleAlert]; - [alertController addAction:[UIAlertAction actionWithTitle:@"Resume App" style:UIAlertActionStyleDefault handler:^(UIAlertAction* action){ + UIAlertController* alertController = [UIAlertController + alertControllerWithTitle: app.appName + message: [app.appId isEqualToString:currentApp.appId] ? @"" : [NSString stringWithFormat:@"%@ is currently running", currentApp.appName]preferredStyle:UIAlertControllerStyleAlert]; + [alertController addAction:[UIAlertAction + actionWithTitle:[app.appId isEqualToString:currentApp.appId] ? @"Resume App" : @"Resume Running App" style:UIAlertActionStyleDefault handler:^(UIAlertAction* action){ NSLog(@"Resuming application: %@", currentApp.appName); [self performSegueWithIdentifier:@"createStreamFrame" sender:nil]; }]]; - [alertController addAction:[UIAlertAction actionWithTitle:@"Quit App" style:UIAlertActionStyleDestructive handler:^(UIAlertAction* action){ + [alertController addAction:[UIAlertAction actionWithTitle: + [app.appId isEqualToString:currentApp.appId] ? @"Quit App" : @"Quit Running App and Start" style:UIAlertActionStyleDestructive handler:^(UIAlertAction* action){ NSLog(@"Quitting application: %@", currentApp.appName); dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ HttpManager* hMan = [[HttpManager alloc] initWithHost:_selectedHost.address uniqueId:_uniqueId deviceName:deviceName cert:_cert];