Fix a few cases where the loading frame could be left on-screen

This commit is contained in:
Cameron Gutman
2018-11-16 20:17:03 -08:00
parent 87cac4e562
commit 845af246b5

View File

@@ -119,6 +119,7 @@ static NSMutableSet* hostList;
usingCachedAppList = true;
dispatch_async(dispatch_get_main_queue(), ^{
if (host != self->_selectedHost) {
[self hideLoadingFrame: nil];
return;
}
@@ -146,6 +147,7 @@ static NSMutableSet* hostList;
Log(LOG_W, @"Failed to get applist: %@", appListResp.statusMessage);
dispatch_async(dispatch_get_main_queue(), ^{
if (host != self->_selectedHost) {
[self hideLoadingFrame: nil];
return;
}
@@ -165,6 +167,7 @@ static NSMutableSet* hostList;
[self updateApplist:[appListResp getAppList] forHost:host];
if (host != self->_selectedHost) {
[self hideLoadingFrame: nil];
return;
}