Skip to content

Commit

Permalink
fix speeds
Browse files Browse the repository at this point in the history
  • Loading branch information
joehand committed May 2, 2017
1 parent 7d6667d commit bc0a461
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,10 @@ function networkUI (state) {

function speed () {
var output = ''
if (state.uploadSpeed) output += `Uploading ${pretty(state.uploadSpeed)}/s`
// !state.nsync hack so speed doesn't display when done
if (!state.nsync && state.downloadSpeed) output += `Downloading ${pretty(state.downloadSpeed)}/s`
var upSpeed = state.uploadSpeed || 0
var downSpeed = state.downloadSpeed || 0
output += `Uploading ${pretty(upSpeed)}/s `
output += `Downloading ${pretty(downSpeed)}/s`
if (output.length) output = '| ' + output
return output
}
Expand Down

0 comments on commit bc0a461

Please sign in to comment.