diff --git a/src/ui/component/fileDownloadLink/view.jsx b/src/ui/component/fileDownloadLink/view.jsx
index d07f2ba03..226d92a36 100644
--- a/src/ui/component/fileDownloadLink/view.jsx
+++ b/src/ui/component/fileDownloadLink/view.jsx
@@ -20,7 +20,7 @@ type Props = {
function FileDownloadLink(props: Props) {
const { fileInfo, downloading, loading, openModal, pause, claimIsMine, download, uri } = props;
- if (downloading) {
+ if (downloading || loading) {
const progress = fileInfo && fileInfo.written_bytes > 0 ? (fileInfo.written_bytes / fileInfo.total_bytes) * 100 : 0;
const label =
fileInfo && fileInfo.written_bytes > 0 ? progress.toFixed(0) + __('% downloaded') : __('Connecting...');
diff --git a/src/ui/modal/modalRemoveFile/index.js b/src/ui/modal/modalRemoveFile/index.js
index 874671d21..27b0a9971 100644
--- a/src/ui/modal/modalRemoveFile/index.js
+++ b/src/ui/modal/modalRemoveFile/index.js
@@ -1,25 +1,19 @@
import { connect } from 'react-redux';
import { doDeleteFileAndMaybeGoBack } from 'redux/actions/file';
-import {
- makeSelectTitleForUri,
- makeSelectClaimIsMine,
- makeSelectFileInfoForUri,
- makeSelectClaimForUri,
-} from 'lbry-redux';
+import { makeSelectTitleForUri, makeSelectClaimIsMine, makeSelectClaimForUri } from 'lbry-redux';
import { doHideModal } from 'redux/actions/app';
import ModalRemoveFile from './view';
const select = (state, props) => ({
claimIsMine: makeSelectClaimIsMine(props.uri)(state),
title: makeSelectTitleForUri(props.uri)(state),
- fileInfo: makeSelectFileInfoForUri(props.uri)(state),
claim: makeSelectClaimForUri(props.uri)(state),
});
const perform = dispatch => ({
closeModal: () => dispatch(doHideModal()),
- deleteFile: (fileInfo, deleteFromComputer, abandonClaim) => {
- dispatch(doDeleteFileAndMaybeGoBack(fileInfo, deleteFromComputer, abandonClaim));
+ deleteFile: (uri, deleteFromComputer, abandonClaim) => {
+ dispatch(doDeleteFileAndMaybeGoBack(uri, deleteFromComputer, abandonClaim));
},
});
diff --git a/src/ui/modal/modalRemoveFile/view.jsx b/src/ui/modal/modalRemoveFile/view.jsx
index ccf05e277..fd5d1192a 100644
--- a/src/ui/modal/modalRemoveFile/view.jsx
+++ b/src/ui/modal/modalRemoveFile/view.jsx
@@ -6,6 +6,7 @@ import Button from 'component/button';
import usePersistedState from 'util/use-persisted-state';
type Props = {
+ uri: string,
claim: StreamClaim,
claimIsMine: boolean,
closeModal: () => void,
@@ -17,11 +18,9 @@ type Props = {
};
function ModalRemoveFile(props: Props) {
- const { claim, claimIsMine, closeModal, deleteFile, fileInfo, title } = props;
+ const { uri, claimIsMine, closeModal, deleteFile, title } = props;
const [deleteChecked, setDeleteChecked] = usePersistedState('modal-remove-file:delete', true);
const [abandonChecked, setAbandonChecked] = usePersistedState('modal-remove-file:abandon', true);
- const { txid, nout } = claim;
- const outpoint = fileInfo ? fileInfo.outpoint : `${txid}:${nout}`;
return (