If get_my_claim returns an error, assume the claim is mine (temporary)
This commit is contained in:
parent
3614640adc
commit
317db4cb4f
1 changed files with 9 additions and 1 deletions
|
@ -169,7 +169,7 @@ var MyFilesPage = React.createClass({
|
||||||
var ownershipLoadedCount = 0;
|
var ownershipLoadedCount = 0;
|
||||||
for (let i = 0; i < filesInfo.length; i++) {
|
for (let i = 0; i < filesInfo.length; i++) {
|
||||||
let fileInfo = filesInfo[i];
|
let fileInfo = filesInfo[i];
|
||||||
lbry.getMyClaim(fileInfo.lbry_uri, (claim) => {
|
lbry.call('get_my_claim', {name: fileInfo.lbry_uri}, (claim) => {
|
||||||
this._filesOwnership[fileInfo.lbry_uri] = !!claim;
|
this._filesOwnership[fileInfo.lbry_uri] = !!claim;
|
||||||
ownershipLoadedCount++;
|
ownershipLoadedCount++;
|
||||||
if (ownershipLoadedCount >= filesInfo.length) {
|
if (ownershipLoadedCount >= filesInfo.length) {
|
||||||
|
@ -177,6 +177,14 @@ var MyFilesPage = React.createClass({
|
||||||
filesOwnershipLoaded: true,
|
filesOwnershipLoaded: true,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}, (claim) => {
|
||||||
|
this._filesOwnership[fileInfo.lbry_uri] = true;
|
||||||
|
ownershipLoadedCount++;
|
||||||
|
if (ownershipLoadedCount >= filesInfo.length) {
|
||||||
|
this.setState({
|
||||||
|
filesOwnershipLoaded: true,
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue