fix file delete on web

This commit is contained in:
Thomas Zarebczan 2020-04-27 18:22:09 -04:00 committed by GitHub
parent a06798966f
commit 700df02a59
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -34,11 +34,6 @@ export function doDeleteFile(outpoint, deleteFromComputer, abandonClaim) {
return (dispatch, getState) => {
const state = getState();
Lbry.file_delete({
outpoint,
delete_from_download_dir: deleteFromComputer,
});
// If the file is for a claim we published then also abandon the claim
const myClaimsOutpoints = selectMyClaimsOutpoints(state);
if (abandonClaim && myClaimsOutpoints.includes(outpoint)) {
@ -47,6 +42,11 @@ export function doDeleteFile(outpoint, deleteFromComputer, abandonClaim) {
dispatch(doAbandonClaim(txid, Number(nout)));
}
// @if TARGET='app'
Lbry.file_delete({
outpoint,
delete_from_download_dir: deleteFromComputer,
});
dispatch({
type: ACTIONS.FILE_DELETE,
data: {