mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-08-27 15:31:27 +00:00
update rawName and channel on edit claim
This commit is contained in:
parent
b8cadad26b
commit
2a09110d53
2 changed files with 8 additions and 3 deletions
|
@ -81,6 +81,9 @@ class FileActions extends React.PureComponent {
|
||||||
navigate,
|
navigate,
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
|
const name = fileInfo ? fileInfo.name : null;
|
||||||
|
const channel = fileInfo ? fileInfo.channel_name : null;
|
||||||
|
|
||||||
const metadata = fileInfo ? fileInfo.metadata : null,
|
const metadata = fileInfo ? fileInfo.metadata : null,
|
||||||
openInFolderMessage = platform.startsWith("Mac")
|
openInFolderMessage = platform.startsWith("Mac")
|
||||||
? __("Open in Finder")
|
? __("Open in Finder")
|
||||||
|
@ -189,7 +192,7 @@ class FileActions extends React.PureComponent {
|
||||||
{claimIsMine &&
|
{claimIsMine &&
|
||||||
<DropDownMenuItem
|
<DropDownMenuItem
|
||||||
key={1}
|
key={1}
|
||||||
onClick={() => navigate("/publish", { name: fileInfo.name })}
|
onClick={() => navigate("/publish", { name, channel })}
|
||||||
label={__("Edit claim")}
|
label={__("Edit claim")}
|
||||||
/>}
|
/>}
|
||||||
<DropDownMenuItem
|
<DropDownMenuItem
|
||||||
|
|
|
@ -418,12 +418,14 @@ class PublishForm extends React.PureComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillMount() {
|
componentWillMount() {
|
||||||
const { name } = this.props.params;
|
const { name, channel } = this.props.params;
|
||||||
|
|
||||||
this.props.fetchClaimListMine();
|
this.props.fetchClaimListMine();
|
||||||
this._updateChannelList();
|
this._updateChannelList();
|
||||||
|
|
||||||
if (name) this.setState({ name });
|
if (name && channel) {
|
||||||
|
this.setState({ name, rawName: name, channel });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue