|
|
@@ -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)); |
|
|
|