If get_my_claim returns an error, assume the claim is mine (temporary)

This commit is contained in:
Alex Liebowitz 2016-09-24 04:41:31 -04:00
parent 3614640adc
commit 317db4cb4f

View file

@ -169,7 +169,7 @@ var MyFilesPage = React.createClass({
var ownershipLoadedCount = 0;
for (let i = 0; i < filesInfo.length; 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;
ownershipLoadedCount++;
if (ownershipLoadedCount >= filesInfo.length) {
@ -177,6 +177,14 @@ var MyFilesPage = React.createClass({
filesOwnershipLoaded: true,
});
}
}, (claim) => {
this._filesOwnership[fileInfo.lbry_uri] = true;
ownershipLoadedCount++;
if (ownershipLoadedCount >= filesInfo.length) {
this.setState({
filesOwnershipLoaded: true,
});
}
});
}
});