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:
parent
0e2dd87c08
commit
0046f49fb5
1 changed files with 4 additions and 2 deletions
|
@ -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 ) );
|
||||
|
|
Loading…
Reference in a new issue