New Channel: Fix incorrect GUI configuration at entry
## Issue: Fixes 4411 `"SelectChannel=New" doesn't show all fields on re-entry` ## Code Changes: `selectChannel`: Correct the value of `addingChannel` in the constructor based on the given props.
This commit is contained in:
parent
99c1401164
commit
ca4dd9e246
2 changed files with 3 additions and 2 deletions
|
@ -18,6 +18,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||||
|
|
||||||
- Fix 'transcoding' checkbox state when switching file types _community pr!_ ([#4529](https://github.com/lbryio/lbry-desktop/pull/4529))
|
- Fix 'transcoding' checkbox state when switching file types _community pr!_ ([#4529](https://github.com/lbryio/lbry-desktop/pull/4529))
|
||||||
- Fix channel file-search not available in mobile _community pr!_ ([#4527](https://github.com/lbryio/lbry-desktop/pull/4527))
|
- Fix channel file-search not available in mobile _community pr!_ ([#4527](https://github.com/lbryio/lbry-desktop/pull/4527))
|
||||||
|
- New Channel: Fix incorrect GUI configuration at entry _community pr!_ ([#4545](https://github.com/lbryio/lbry-desktop/pull/4545))
|
||||||
|
|
||||||
## [0.47.0] - [2020-07-13]
|
## [0.47.0] - [2020-07-13]
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ class ChannelSelection extends React.PureComponent<Props, State> {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
addingChannel: false,
|
addingChannel: props.channel === CHANNEL_NEW,
|
||||||
};
|
};
|
||||||
|
|
||||||
(this: any).handleChannelChange = this.handleChannelChange.bind(this);
|
(this: any).handleChannelChange = this.handleChannelChange.bind(this);
|
||||||
|
@ -77,7 +77,7 @@ class ChannelSelection extends React.PureComponent<Props, State> {
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const channel = this.state.addingChannel ? 'new' : this.props.channel;
|
const channel = this.state.addingChannel ? CHANNEL_NEW : this.props.channel;
|
||||||
const { fetchingChannels, channels = [], hideAnon, hideNew, label, injected = [] } = this.props;
|
const { fetchingChannels, channels = [], hideAnon, hideNew, label, injected = [] } = this.props;
|
||||||
const { addingChannel } = this.state;
|
const { addingChannel } = this.state;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue