navigate back after delete if abandoned
This commit is contained in:
parent
ce955e1454
commit
4aa6330f9a
2 changed files with 5 additions and 6 deletions
|
@ -923,6 +923,7 @@
|
||||||
"refreshing the app": "refreshing the app",
|
"refreshing the app": "refreshing the app",
|
||||||
"Follower": "Follower",
|
"Follower": "Follower",
|
||||||
"%repost_channel_link% reposted": "%repost_channel_link% reposted",
|
"%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.",
|
"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."
|
"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 { outpoint } = makeSelectFileInfoForUri(uri)(state) || '';
|
||||||
const { nout, txid } = makeSelectClaimForUri(uri)(state);
|
const { nout, txid } = makeSelectClaimForUri(uri)(state);
|
||||||
const claimOutpoint = `${txid}:${nout}`;
|
const claimOutpoint = `${txid}:${nout}`;
|
||||||
|
|
||||||
const actions = [];
|
const actions = [];
|
||||||
actions.push(doHideModal());
|
actions.push(doHideModal());
|
||||||
actions.push(doDeleteFile(outpoint || claimOutpoint, deleteFromComputer, abandonClaim));
|
actions.push(doDeleteFile(outpoint || claimOutpoint, deleteFromComputer, abandonClaim));
|
||||||
|
@ -71,13 +70,12 @@ export function doDeleteFileAndMaybeGoBack(uri, deleteFromComputer, abandonClaim
|
||||||
if (playingUri === uri) {
|
if (playingUri === uri) {
|
||||||
actions.push(doSetPlayingUri(null));
|
actions.push(doSetPlayingUri(null));
|
||||||
}
|
}
|
||||||
|
|
||||||
// it would be nice to stay on the claim if you just want to delete it
|
// 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
|
// we need to alter autoplay to not start downloading again after you delete it
|
||||||
// if (abandonClaim) {
|
|
||||||
actions.push(goBack());
|
|
||||||
// }
|
|
||||||
|
|
||||||
dispatch(batchActions(...actions));
|
dispatch(batchActions(...actions));
|
||||||
|
if (abandonClaim) {
|
||||||
|
dispatch(goBack());
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue