Browse Source

bug[#1607]: Custom channels are no longer duplicated in the channel picker on rezone

tags/v0.8.1^2
Shaun 3 years ago
parent
commit
b318cc49d4
1 changed files with 9 additions and 5 deletions
  1. +9
    -5
      src/client/ui/templates/messages/messages.js

+ 9
- 5
src/client/ui/templates/messages/messages.js View File

@@ -96,16 +96,20 @@ define([
},

onJoinChannel: function (channel) {
this.customChannels.push(channel);
const container = this.find('.filters');

const channelName = channel.trim();

this.find(`[filter="${channel.trim()}"]`).remove();
this.customChannels.spliceWhere(c => c === channel);
this.find(`[filter="${channelName}"]`).remove();

this.customChannels.push(channel);

let container = this.find('.filters');
$(tplTab)
.appendTo(container)
.addClass('channel')
.attr('filter', channel.trim())
.html(channel.trim())
.attr('filter', channelName)
.html(channelName)
.on('mouseover', this.onFilterHover.bind(this, true))
.on('mouseleave', this.onFilterHover.bind(this, false))
.on('click', this.onClickFilter.bind(this));


Loading…
Cancel
Save