Fixed channel unsubscribe/subscribe issue (#47)
This commit is contained in:
parent
9450f4fc81
commit
1cf166eefb
1 changed files with 29 additions and 22 deletions
|
@ -471,6 +471,10 @@ class ChannelEntry {
|
||||||
name: tr("<b>Switch to channel</b>"),
|
name: tr("<b>Switch to channel</b>"),
|
||||||
callback: () => this.joinChannel()
|
callback: () => this.joinChannel()
|
||||||
},
|
},
|
||||||
|
...(() => {
|
||||||
|
const local_client = this.channelTree.client.getClient();
|
||||||
|
if (!local_client || local_client.currentChannel() !== this)
|
||||||
|
return [
|
||||||
MenuEntry.HR(),
|
MenuEntry.HR(),
|
||||||
{
|
{
|
||||||
type: MenuEntryType.ENTRY,
|
type: MenuEntryType.ENTRY,
|
||||||
|
@ -492,7 +496,10 @@ class ChannelEntry {
|
||||||
name: tr("<b>Use inherited subscribe mode</b>"),
|
name: tr("<b>Use inherited subscribe mode</b>"),
|
||||||
callback: () => this.unsubscribe(true),
|
callback: () => this.unsubscribe(true),
|
||||||
visible: this.subscribe_mode != ChannelSubscribeMode.INHERITED
|
visible: this.subscribe_mode != ChannelSubscribeMode.INHERITED
|
||||||
},
|
}
|
||||||
|
];
|
||||||
|
return [];
|
||||||
|
})(),
|
||||||
MenuEntry.HR(),
|
MenuEntry.HR(),
|
||||||
{
|
{
|
||||||
type: MenuEntryType.ENTRY,
|
type: MenuEntryType.ENTRY,
|
||||||
|
|
Loading…
Add table
Reference in a new issue