Merge branch 'dev' into immediate-finds
This commit is contained in:
commit
b798f31669
|
@ -320,25 +320,26 @@ export default definePlugin({
|
||||||
</svg>
|
</svg>
|
||||||
</h2>
|
</h2>
|
||||||
);
|
);
|
||||||
}),
|
}, { noop: true }),
|
||||||
|
|
||||||
renderChannel(sectionIndex: number, index: number, ChannelComponent: React.ComponentType<ChannelComponentProps>) {
|
renderChannel(sectionIndex: number, index: number, ChannelComponent: React.ComponentType<ChannelComponentProps>) {
|
||||||
const { channel, category } = this.getChannel(sectionIndex, index, this.instance.props.channels);
|
return ErrorBoundary.wrap(() => {
|
||||||
|
const { channel, category } = this.getChannel(sectionIndex, index, this.instance.props.channels);
|
||||||
|
|
||||||
if (!channel || !category) return null;
|
if (!channel || !category) return null;
|
||||||
if (this.isChannelHidden(sectionIndex, index)) return null;
|
if (this.isChannelHidden(sectionIndex, index)) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ChannelComponent
|
<ChannelComponent
|
||||||
channel={channel}
|
channel={channel}
|
||||||
selected={this.instance.props.selectedChannelId === channel.id}
|
selected={this.instance.props.selectedChannelId === channel.id}
|
||||||
>
|
>
|
||||||
{channel.id}
|
{channel.id}
|
||||||
</ChannelComponent>
|
</ChannelComponent>
|
||||||
);
|
);
|
||||||
|
}, { noop: true });
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
getChannel(sectionIndex: number, index: number, channels: Record<string, Channel>) {
|
getChannel(sectionIndex: number, index: number, channels: Record<string, Channel>) {
|
||||||
const category = categories[sectionIndex - 1];
|
const category = categories[sectionIndex - 1];
|
||||||
if (!category) return { channel: null, category: null };
|
if (!category) return { channel: null, category: null };
|
||||||
|
|
Loading…
Reference in a new issue