From 5ffef4383d52d8ff7f9069f21cd3268509512de2 Mon Sep 17 00:00:00 2001 From: WolverinDEV Date: Sun, 4 Nov 2018 15:48:52 +0100 Subject: [PATCH] Fixed bug that client cant select himself anymore --- shared/js/ui/client.ts | 6 ++++-- shared/js/ui/view.ts | 2 -- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/shared/js/ui/client.ts b/shared/js/ui/client.ts index b3a06c0e..42478d99 100644 --- a/shared/js/ui/client.ts +++ b/shared/js/ui/client.ts @@ -91,7 +91,7 @@ class ClientEntry { return this.audioController; } - initializeListener(){ + protected initializeListener(){ if(this._listener_initialized) return; this._listener_initialized = true; @@ -412,7 +412,9 @@ class ClientEntry { clientIcons.append($.spawn("span").addClass("client_icon")); tag.append(clientIcons); - return this._tag = tag; + this._tag = tag; + this.initializeListener(); + return this._tag; } static chatTag(id: number, name: string, uid: string, braces: boolean = false) : JQuery { diff --git a/shared/js/ui/view.ts b/shared/js/ui/view.ts index 9c4911ff..5be5b9b5 100644 --- a/shared/js/ui/view.ts +++ b/shared/js/ui/view.ts @@ -206,7 +206,6 @@ class ChannelTree { tag.appendTo(channel.clientTag()); channel.adjustSize(true); client.currentChannel().reorderClients(); - client.initializeListener(); channel.updateChannelTypeIcon(); return client; @@ -215,7 +214,6 @@ class ChannelTree { registerClient(client: ClientEntry) { this.clients.push(client); client.channelTree = this; - client.initializeListener(); } reorderAllClients() {