Don't display Downloading bar on published files

We handled this just fine until recently; not sure where the regression
happened.
This commit is contained in:
Alex Liebowitz 2017-03-27 02:55:51 -04:00
parent e523906901
commit b8f1447b7e

View file

@ -179,7 +179,7 @@ let FileActionsRow = React.createClass({
let linkBlock;
if (this.state.fileInfo === false && !this.state.attemptingDownload) {
linkBlock = <Link button="text" label="Download" icon="icon-download" onClick={this.onDownloadClick} />;
} else if (this.state.attemptingDownload || !this.state.fileInfo.completed) {
} else if (this.state.attemptingDownload || (!this.state.fileInfo.completed && !this.state.fileInfo.isMine)) {
const
progress = this.state.fileInfo ? this.state.fileInfo.written_bytes / this.state.fileInfo.total_bytes * 100 : 0,
label = this.state.fileInfo ? progress.toFixed(0) + '% complete' : 'Connecting...',