Merge pull request #3642 from lbryio/fix-goBackAfterDelete
navigate back after delete if abandoned
This commit is contained in:
commit
5a38c5081f
2 changed files with 5 additions and 6 deletions
|
@ -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."
|
||||
}
|
|
@ -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());
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue