From 46fe7a8aed46cf2408217e4fa9fa5c0f3ef161d1 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 12 Jul 2015 00:30:44 -0700 Subject: [PATCH] Don't show error messages if the PC isn't selected anymore --- Limelight/ViewControllers/MainFrameViewController.m | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Limelight/ViewControllers/MainFrameViewController.m b/Limelight/ViewControllers/MainFrameViewController.m index 1fa5d3e..0e9e7f7 100644 --- a/Limelight/ViewControllers/MainFrameViewController.m +++ b/Limelight/ViewControllers/MainFrameViewController.m @@ -105,6 +105,11 @@ static NSMutableSet* hostList; Log(LOG_W, @"Failed to get applist: %@", appListResp.statusMessage); dispatch_async(dispatch_get_main_queue(), ^{ [self hideLoadingFrame]; + + if (host != _selectedHost) { + return; + } + UIAlertController* applistAlert = [UIAlertController alertControllerWithTitle:@"Fetching App List Failed" message:@"The connection to the PC was interrupted." preferredStyle:UIAlertControllerStyleAlert]; @@ -228,6 +233,11 @@ static NSMutableSet* hostList; Log(LOG_W, @"Failed to get server info: %@", serverInfoResp.statusMessage); dispatch_async(dispatch_get_main_queue(), ^{ [self hideLoadingFrame]; + + if (host != _selectedHost) { + return; + } + UIAlertController* applistAlert = [UIAlertController alertControllerWithTitle:@"Fetching Server Info Failed" message:@"The connection to the PC was interrupted." preferredStyle:UIAlertControllerStyleAlert];