Changeset 3948


Ignore:
Timestamp:
Nov 23, 2007, 5:49:05 PM (15 years ago)
Author:
livings124
Message:

remove redundant code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Torrent.m

    r3947 r3948  
    882882   
    883883    //add time when downloading
    884     if (fStat->status == TR_STATUS_DOWNLOAD)
    885     {
    886         int eta = [self eta];
     884    if (fStat->status == TR_STATUS_DOWNLOAD || ([self isSeeding] && fRatioSetting != NSOffState))
     885    {
     886        int eta = fStat->status == TR_STATUS_DOWNLOAD ? [self eta] : [self etaRatio];
    887887        string = eta >= 0 ? [string stringByAppendingFormat: NSLocalizedString(@" - %@ remaining", "Torrent -> progress string"),
    888888                                [self etaString: eta]]
    889889            : [string stringByAppendingString: NSLocalizedString(@" - remaining time unknown", "Torrent -> progress string")];
    890890    }
    891     else if ([self isSeeding] && fRatioSetting != NSOffState)
    892     {
    893         int eta = [self etaRatio];
    894         string = eta >= 0 ? [string stringByAppendingFormat: NSLocalizedString(@" - %@ remaining", "Torrent -> progress string"),
    895                                 [self etaString: eta]]
    896             : [string stringByAppendingString: NSLocalizedString(@" - remaining time unknown", "Torrent -> progress string")];
    897     }
    898     else;
    899891   
    900892    return string;
Note: See TracChangeset for help on using the changeset viewer.