mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2025-07-26 22:24:40 +00:00
Speed up app icon load time by 2 seconds by only waiting if it failed
This commit is contained in:
parent
46fe7a8aed
commit
6dbb938368
@ -28,7 +28,9 @@ static const int MAX_ATTEMPTS = 5;
|
|||||||
appImage = [UIImage imageWithData:appAssetResp.data];
|
appImage = [UIImage imageWithData:appAssetResp.data];
|
||||||
self.app.image = UIImagePNGRepresentation(appImage);
|
self.app.image = UIImagePNGRepresentation(appImage);
|
||||||
|
|
||||||
[NSThread sleepForTimeInterval:RETRY_DELAY];
|
if (![self isCancelled] && appImage == nil) {
|
||||||
|
[NSThread sleepForTimeInterval:RETRY_DELAY];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
[self performSelectorOnMainThread:@selector(sendCallbackForApp:) withObject:self.app waitUntilDone:NO];
|
[self performSelectorOnMainThread:@selector(sendCallbackForApp:) withObject:self.app waitUntilDone:NO];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user