Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
lbry
lbry-react-native
Commits
2465b551
Commit
2465b551
authored
Jan 20, 2020
by
Akinwale Ariwodola
Browse files
remove download notification if file is deleted from Library page
parent
df3a9587
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/page/downloads/view.js
View file @
2465b551
...
...
@@ -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
();
...
...
src/page/file/view.js
View file @
2465b551
...
...
@@ -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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment