Skip to content

Commit

Permalink
Speed up app icon load time by 2 seconds by only waiting if it failed
Browse files Browse the repository at this point in the history
  • Loading branch information
cgutman committed Jul 12, 2015
1 parent 46fe7a8 commit 6dbb938
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Limelight/Network/AppAssetRetriever.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ - (void) main {
appImage = [UIImage imageWithData:appAssetResp.data];
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];
}
Expand Down

0 comments on commit 6dbb938

Please sign in to comment.