1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-02-18 20:30:43 +00:00

fix last activity display in qt client

This commit is contained in:
Daniel Lee 2010-09-14 04:08:24 +00:00
parent 0e2dd87c08
commit 0046f49fb5

View file

@ -499,8 +499,10 @@ Details :: refresh( )
if( latest < dt )
latest = dt;
}
const int seconds = latest.secsTo( qdt_now );
if( seconds < 5 )
const int seconds = latest.isValid() ? latest.secsTo( qdt_now ) : -1;
if( seconds < 0 )
string = none;
else if( seconds < 5 )
string = tr( "Active now" );
else
string = tr( "%1 ago" ).arg( Formatter::timeToString( seconds ) );