don't use channel name in FileList
This commit is contained in:
parent
ddb3106185
commit
c0e6de66a4
1 changed files with 6 additions and 16 deletions
|
@ -8,6 +8,7 @@ type FileInfo = {
|
||||||
name: string,
|
name: string,
|
||||||
channelName: ?string,
|
channelName: ?string,
|
||||||
pending?: boolean,
|
pending?: boolean,
|
||||||
|
channel_claim_id: string,
|
||||||
value?: {
|
value?: {
|
||||||
publisherSignature: {
|
publisherSignature: {
|
||||||
certificateId: string,
|
certificateId: string,
|
||||||
|
@ -139,6 +140,8 @@ class FileList extends React.PureComponent<Props, State> {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sortFunctions: {};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { fileInfos, hideFilter, checkPending } = this.props;
|
const { fileInfos, hideFilter, checkPending } = this.props;
|
||||||
const { sortBy } = this.state;
|
const { sortBy } = this.state;
|
||||||
|
@ -149,27 +152,14 @@ class FileList extends React.PureComponent<Props, State> {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.sortFunctions[sortBy](fileInfos).forEach(fileInfo => {
|
this.sortFunctions[sortBy](fileInfos).forEach(fileInfo => {
|
||||||
const {
|
const { name: claimName, claim_name: claimNameDownloaded, claim_id: claimId } = fileInfo;
|
||||||
channel_name: channelName,
|
|
||||||
name: claimName,
|
|
||||||
claim_name: claimNameDownloaded,
|
|
||||||
claim_id: claimId,
|
|
||||||
} = fileInfo;
|
|
||||||
const uriParams = {};
|
const uriParams = {};
|
||||||
|
|
||||||
// This is unfortunate
|
// This is unfortunate
|
||||||
// https://github.com/lbryio/lbry/issues/1159
|
// https://github.com/lbryio/lbry/issues/1159
|
||||||
const name = claimName || claimNameDownloaded;
|
const name = claimName || claimNameDownloaded;
|
||||||
|
uriParams.contentName = name;
|
||||||
if (channelName) {
|
uriParams.claimId = claimId;
|
||||||
uriParams.channelName = channelName;
|
|
||||||
uriParams.contentName = name;
|
|
||||||
uriParams.claimId = this.getChannelSignature(fileInfo);
|
|
||||||
} else {
|
|
||||||
uriParams.claimId = claimId;
|
|
||||||
uriParams.claimName = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
const uri = buildURI(uriParams);
|
const uri = buildURI(uriParams);
|
||||||
|
|
||||||
content.push(<FileCard key={uri} uri={uri} checkPending={checkPending} />);
|
content.push(<FileCard key={uri} uri={uri} checkPending={checkPending} />);
|
||||||
|
|
Loading…
Reference in a new issue