update each torrent's stats in the same loop as where we pull the transfer rates (now that the update method doesn't have any other effects)

This commit is contained in:
Mitchell Livingston 2011-08-21 16:00:28 +00:00
parent 340a403c69
commit 576a0436f9
1 changed files with 7 additions and 3 deletions

View File

@ -919,6 +919,8 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
[fTorrents addObject: torrent];
[torrent release];
#warning set to bottom of queue
[self fullUpdateUI];
}
else
@ -988,6 +990,8 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
[fTorrents addObject: torrent];
[torrent release];
#warning set to bottom of queue
[self fullUpdateUI];
}
else
@ -1665,13 +1669,13 @@ static void sleepCallback(void * controller, io_service_t y, natural_t messageTy
- (void) updateUI
{
[fTorrents makeObjectsPerformSelector: @selector(update)];
//pull the upload and download speeds - most consistent by using current stats
CGFloat dlRate = 0.0, ulRate = 0.0;
BOOL completed = NO;
for (Torrent * torrent in fTorrents)
{
[torrent update];
//pull the upload and download speeds - most consistent by using current stats
dlRate += [torrent downloadRate];
ulRate += [torrent uploadRate];