navigate back after delete if abandoned

This commit is contained in:
jessop 2020-02-05 15:54:41 -05:00
parent ce955e1454
commit 4aa6330f9a
2 changed files with 5 additions and 6 deletions

View file

@ -923,6 +923,7 @@
"refreshing the app": "refreshing the app",
"Follower": "Follower",
"%repost_channel_link% reposted": "%repost_channel_link% reposted",
"Abandon on blockchain (reclaim %amount% LBC)": "Abandon on blockchain (reclaim %amount% LBC)",
"This channel may have been unpublished.": "This channel may have been unpublished.",
"There was an error. Try %refreshing_the_app_link% to fix it. If that doesn't work, try pressing Ctrl+R/Cmd+R.": "There was an error. Try %refreshing_the_app_link% to fix it. If that doesn't work, try pressing Ctrl+R/Cmd+R."
}
}

View file

@ -63,7 +63,6 @@ export function doDeleteFileAndMaybeGoBack(uri, deleteFromComputer, abandonClaim
const { outpoint } = makeSelectFileInfoForUri(uri)(state) || '';
const { nout, txid } = makeSelectClaimForUri(uri)(state);
const claimOutpoint = `${txid}:${nout}`;
const actions = [];
actions.push(doHideModal());
actions.push(doDeleteFile(outpoint || claimOutpoint, deleteFromComputer, abandonClaim));
@ -71,13 +70,12 @@ export function doDeleteFileAndMaybeGoBack(uri, deleteFromComputer, abandonClaim
if (playingUri === uri) {
actions.push(doSetPlayingUri(null));
}
// it would be nice to stay on the claim if you just want to delete it
// we need to alter autoplay to not start downloading again after you delete it
// if (abandonClaim) {
actions.push(goBack());
// }
dispatch(batchActions(...actions));
if (abandonClaim) {
dispatch(goBack());
}
};
}