Fixed channel unsubscribe/subscribe issue (#47)

This commit is contained in:
WolverinDEV 2019-06-09 10:40:44 +02:00
parent 9450f4fc81
commit 1cf166eefb

View file

@ -471,6 +471,10 @@ class ChannelEntry {
name: tr("<b>Switch to channel</b>"),
callback: () => this.joinChannel()
},
...(() => {
const local_client = this.channelTree.client.getClient();
if (!local_client || local_client.currentChannel() !== this)
return [
MenuEntry.HR(),
{
type: MenuEntryType.ENTRY,
@ -492,7 +496,10 @@ class ChannelEntry {
name: tr("<b>Use inherited subscribe mode</b>"),
callback: () => this.unsubscribe(true),
visible: this.subscribe_mode != ChannelSubscribeMode.INHERITED
},
}
];
return [];
})(),
MenuEntry.HR(),
{
type: MenuEntryType.ENTRY,