[redesign] moar fixes #1236

Merged
neb-b merged 7 commits from redesign-fixes into master 2018-04-04 01:07:49 +02:00
Showing only changes of commit 4c112d91d2 - Show all commits

View file

@ -22,6 +22,8 @@ type FileInfo = {
type Props = {
hideFilter: boolean,
sortByHeight?: boolean,
claimsById: Array<{}>,
fileInfos: Array<FileInfo>,
};
@ -141,16 +143,25 @@ class FileList extends React.PureComponent<Props, State> {
const content = [];
this.sortFunctions[sortBy](fileInfos).forEach(fileInfo => {
const { channel_name: channelName, name: claimName, claim_id: claimId } = fileInfo;
const {
channel_name: channelName,
name: claimName,
claim_name: claimNameDownloaded,
claim_id: claimId,
} = fileInfo;
const uriParams = {};
// This is unfortunate
// https://github.com/lbryio/lbry/issues/1159
const name = claimName || claimNameDownloaded;
if (channelName) {
uriParams.channelName = channelName;
uriParams.contentName = claimName;
uriParams.contentName = name;
uriParams.claimId = this.getChannelSignature(fileInfo);
} else {
uriParams.claimId = claimId;
uriParams.claimName = claimName;
uriParams.claimName = name;
}
const uri = buildURI(uriParams);