now cache app images and reuse them when connecting to the same host

This commit is contained in:
Diego Waxemberg
2015-01-08 22:18:26 -05:00
parent ccd8b3332e
commit ec39c27498
3 changed files with 42 additions and 21 deletions

View File

@@ -78,11 +78,9 @@ static StreamConfiguration* streamConfig;
dispatch_async(dispatch_get_main_queue(), ^{
[self updateApps];
});
if (_appManager != nil) {
[_appManager stopRetrieving];
}
_appManager = [[AppManager alloc] initWithHost:_selectedHost andCallback:self];
[_appManager retrieveAssets:appList];
[_appManager stopRetrieving];
[_appManager retrieveAssets:appList fromHost:_selectedHost];
});
}
@@ -299,6 +297,8 @@ static StreamConfiguration* streamConfig;
_uniqueId = [CryptoManager getUniqueID];
_cert = [CryptoManager readCertFromFile];
_appManager = [[AppManager alloc] initWithCallback:self];
// Only initialize the host picker list once
if (hostList == nil) {
hostList = [[NSMutableSet alloc] init];