1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-23 16:24:02 +00:00

(gtk) have "active" filter key off of (tr_stat.peersSendingToUs + tr_stat.peersGettingFromUs) rather than (rateUpload + rateDownload) so that a peer temporarily dropping to zero KiB/s won't drop it off the active filter.

This commit is contained in:
Charles Kerr 2008-02-13 16:16:50 +00:00
parent ee0682349f
commit b7815edc49
2 changed files with 4 additions and 4 deletions

View file

@ -124,8 +124,8 @@ static char*
getShortTransferString( const tr_stat * torStat, char * buf, size_t buflen )
{
char downStr[32], upStr[32];
const int haveDown = ( torStat->rateDownload * 1024 ) > 1.0;
const int haveUp = ( torStat->rateUpload * 1024 ) > 1.0;
const int haveDown = torStat->peersSendingToUs > 0;
const int haveUp = torStat->peersGettingFromUs > 0;
if( haveDown )
tr_strlspeed( downStr, torStat->rateDownload, sizeof(downStr) );

View file

@ -304,8 +304,8 @@ checkFilterMode( filter_mode_t filter_mode,
const tr_stat * torStat )
{
int ret = 0;
const int haveDown = ((int)( torStat->rateDownload * 1024 )) > 1.0;
const int haveUp = ((int)( torStat->rateUpload * 1024 )) > 1.0;
const int haveDown = torStat->peersSendingToUs > 0;
const int haveUp = torStat->peersGettingFromUs > 0;
switch( filter_mode )
{