fix: delete button for blobs

Show delete as soon as any blobs are saved.
This commit is contained in:
Thomas Zarebczan 2019-08-14 19:34:14 -04:00 committed by Sean Yesmunt
parent f6858beb68
commit c3f4d66773

View file

@ -16,9 +16,7 @@ type Props = {
class FileActions extends React.PureComponent<Props> { class FileActions extends React.PureComponent<Props> {
render() { render() {
const { fileInfo, uri, openModal, claimIsMine, claimId } = this.props; const { fileInfo, uri, openModal, claimIsMine, claimId } = this.props;
const showDelete = const showDelete = claimIsMine || (fileInfo && (fileInfo.written_bytes > 0 || fileInfo.blobs_completed > 0));
claimIsMine ||
(fileInfo && (fileInfo.written_bytes > 0 || fileInfo.blobs_completed === fileInfo.blobs_in_stream));
return ( return (
<React.Fragment> <React.Fragment>
{showDelete && ( {showDelete && (