Send out progress callbacks sooner.

- as soon as the NSURLConnection gets initialized
- helps to allocate and show progress indication sooner and prevent large delays without progress indication (for example when the server takes long to respond)
- estimated size is always 0 at this point, clients can use this to decide if they want to handle this callback or skip it
This commit is contained in:
Matej Bukovinski 2012-12-10 12:40:05 +01:00
parent 37f71de26c
commit b4fb940cbc
1 changed files with 4 additions and 0 deletions

View File

@ -71,6 +71,10 @@
if (self.connection)
{
if (self.progressBlock)
{
self.progressBlock(0, 0);
}
[[NSNotificationCenter defaultCenter] postNotificationName:SDWebImageDownloadStartNotification object:self];
}
else