Commit 2465b551 authored by Akinwale Ariwodola's avatar Akinwale Ariwodola
Browse files

remove download notification if file is deleted from Library page

parent df3a9587
......@@ -125,7 +125,11 @@ class DownloadsPage extends React.PureComponent {
onPress: () => {
const uris = Object.keys(selectedClaimsMap);
uris.forEach(uri => {
const { txid, nout } = selectedClaimsMap[uri];
const { txid, nout, name, claim_id: claimId } = selectedClaimsMap[uri];
if (name && claimId) {
NativeModules.UtilityModule.deleteDownload(normalizeURI(`${name}#${claimId}`));
}
deleteFile(`${txid}:${nout}`, true);
});
this.onExitSelectionMode();
......
......@@ -345,11 +345,12 @@ class FilePage extends React.PureComponent {
text: __('Yes'),
onPress: () => {
const { uri } = navigation.state.params;
const purchaseUrl = this.getPurchaseUrl();
deleteFile(`${claim.txid}:${claim.nout}`, true);
deletePurchasedUri(uri);
NativeModules.UtilityModule.deleteDownload(uri);
NativeModules.UtilityModule.deleteDownload(normalizeURI(purchaseUrl));
this.setState({
downloadPressed: false,
fileViewLogged: false,
......@@ -387,9 +388,8 @@ class FilePage extends React.PureComponent {
const uri = this.getPurchaseUrl();
stopDownload(uri, fileInfo);
deletePurchasedUri(uri);
if (NativeModules.UtilityModule) {
NativeModules.UtilityModule.deleteDownload(uri);
}
NativeModules.UtilityModule.deleteDownload(normalizeURI(uri));
this.setState({
downloadPressed: false,
fileViewLogged: false,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment