Fix history logic #504

Closed
btzr-io wants to merge 5 commits from patch-2 into master
3 changed files with 13 additions and 4 deletions
Showing only changes of commit 49ab36dd1e - Show all commits

View file

@ -33,6 +33,7 @@ Web UI version numbers should always match the corresponding version of LBRY App
* Fixed rendering of small prices (#461)
* Fixed incorrect URI in Downloads/Published page (#460)
* Fixed backward / forward logic of history (#499)
* Fixed menu bug (#503)
### Deprecated
*

View file

@ -51,6 +51,14 @@ class FileList extends React.PureComponent {
};
}
getChannelSignature(fileInfo) {
if (fileInfo.value) {
return fileInfo.value.publisherSignature.certificateId;
} else {
return fileInfo.metadata.publisherSignature.certificateId;
}
}
handleSortChanged(event) {
this.setState({
sortBy: event.target.value,
@ -68,8 +76,7 @@ class FileList extends React.PureComponent {
if (fileInfo.channel_name) {
uriParams.channelName = fileInfo.channel_name;
uriParams.contentName = fileInfo.name;
// The following can be done as certificateID of a claim is nothing but the claimID of the channel.
uriParams.claimId = fileInfo.value.publisherSignature.certificateId;
uriParams.claimId = this.getChannelSignature(fileInfo);
} else {
uriParams.claimId = fileInfo.claim_id;
uriParams.name = fileInfo.name;

View file

@ -69,7 +69,8 @@ export class DropDownMenu extends React.PureComponent {
});
}
handleWindowClick(e) {
/*this will force "this" to always be the class, even when passed to an event listener*/
handleWindowClick = e => {
if (
this.state.menuOpen &&
(!this._menuDiv || !this._menuDiv.contains(e.target))
@ -78,7 +79,7 @@ export class DropDownMenu extends React.PureComponent {
menuOpen: false,
});
}
}
};
render() {
if (!this.state.menuOpen && this._isWindowClickBound) {