mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-17 14:11:33 +00:00
Speed up app icon load time by 2 seconds by only waiting if it failed
This commit is contained in:
@@ -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];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user