From dc6ebffab1ce2f0e7ce8c753542c42f6258aca02 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sat, 11 Jul 2015 01:29:28 -0700 Subject: [PATCH] Allow unpaired computer to be deleted. Remove the unpairing option since it hasn't worked for ages. --- .../ViewControllers/MainFrameViewController.m | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/Limelight/ViewControllers/MainFrameViewController.m b/Limelight/ViewControllers/MainFrameViewController.m index d1ad360..5be5de1 100644 --- a/Limelight/ViewControllers/MainFrameViewController.m +++ b/Limelight/ViewControllers/MainFrameViewController.m @@ -214,22 +214,9 @@ static NSMutableSet* hostList; } - (void)hostLongClicked:(Host *)host view:(UIView *)view { - // Long clicking a host is currently only applicable to paired - // computers, so ignore it for unpaired hosts. - if (host.pairState != PairStatePaired) { - return; - } - Log(LOG_D, @"Long clicked host: %@", host.name); UIAlertController* longClickAlert = [UIAlertController alertControllerWithTitle:host.name message:@"" preferredStyle:UIAlertControllerStyleActionSheet]; - if (host.online) { - [longClickAlert addAction:[UIAlertAction actionWithTitle:@"Unpair" style:UIAlertActionStyleDefault handler:^(UIAlertAction* action){ - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - HttpManager* hMan = [[HttpManager alloc] initWithHost:host.activeAddress uniqueId:_uniqueId deviceName:deviceName cert:_cert]; - [hMan executeRequestSynchronously:[HttpRequest requestWithUrlRequest:[hMan newUnpairRequest]]]; - }); - }]]; - } else { + if (!host.online) { [longClickAlert addAction:[UIAlertAction actionWithTitle:@"Wake" style:UIAlertActionStyleDefault handler:^(UIAlertAction* action){ UIAlertController* wolAlert = [UIAlertController alertControllerWithTitle:@"Wake On Lan" message:@"" preferredStyle:UIAlertControllerStyleAlert]; [wolAlert addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil]];