fix for when filtering and a transfer goes from checking (download) to seeding without refreshing the filter

This commit is contained in:
Mitchell Livingston 2007-01-20 03:59:50 +00:00
parent d97ac66e43
commit 8ee2e36f0a
2 changed files with 12 additions and 6 deletions

View File

@ -50,9 +50,8 @@
int fUploadLimit, fDownloadLimit;
float fRatioLimit;
BOOL fLimitCustom, fCheckUpload, fCheckDownload,
fRatioCustom, fShouldStopAtRatio,
fFinishedSeeding, fWaitToStart, fError;
BOOL fLimitCustom, fCheckUpload, fCheckDownload, fRatioCustom, fShouldStopAtRatio,
fFinishedSeeding, fWaitToStart, fError, fChecking;
int fOrderValue;

View File

@ -290,10 +290,12 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
[NSString stringForFileSize: [self size]], [NSString stringForFileSize: [self uploadedTotal]],
[NSString stringForRatio: [self ratio]]];
BOOL wasChecking = fChecking;
fChecking = NO;
switch (fStat->status)
{
NSString * tempString;
case TR_STATUS_PAUSE:
if (fWaitToStart)
{
@ -318,6 +320,8 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
[fShortStatusString setString: tempString];
[fRemainingTimeString setString: tempString];
fChecking = YES;
break;
case TR_STATUS_DOWNLOAD:
@ -368,8 +372,8 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
[fStatusString appendFormat: NSLocalizedString(@"Seeding to %d of %d peers", "Torrent -> status string"),
[self peersDownloading], [self totalPeers]];
else
[fStatusString appendFormat: NSLocalizedString(@"Seeding to %d of %d peer", "Torrent -> status string"),
[self peersDownloading], [self totalPeers]];
[fStatusString appendFormat: NSLocalizedString(@"Seeding to %d of 1 peer", "Torrent -> status string"),
[self peersDownloading]];
break;
@ -382,6 +386,9 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
break;
}
if (wasChecking && !fChecking)
[[NSNotificationCenter defaultCenter] postNotificationName: @"UpdateQueue" object: self];
if (fStat->error)
{
[fStatusString setString: [NSLocalizedString(@"Error: ", "Torrent -> status string") stringByAppendingString: