Fixed some bugs

This commit is contained in:
WolverinDEV 2018-09-30 22:47:41 +02:00
parent 07fb7a99bc
commit b62c6fc339
3 changed files with 6 additions and 3 deletions

View file

@ -110,7 +110,7 @@ class ClientEntry {
protected assignment_context() : ContextMenuEntry[] { protected assignment_context() : ContextMenuEntry[] {
let server_groups: ContextMenuEntry[] = []; let server_groups: ContextMenuEntry[] = [];
for(let group of this.channelTree.client.groups.serverGroups.sort(GroupManager.sorter())) { for(let group of this.channelTree.client.groups.serverGroups.sort(GroupManager.sorter())) {
if(group.type == GroupType.NORMAL) continue; if(group.type != GroupType.NORMAL) continue;
let entry: ContextMenuEntry = {} as any; let entry: ContextMenuEntry = {} as any;
@ -553,6 +553,7 @@ class ClientEntry {
} }
updateGroupIcon(group: Group) { updateGroupIcon(group: Group) {
if(!group) return;
//TODO group icon order //TODO group icon order
this.tag.find(".group_icons .icon_group_" + group.id).detach(); this.tag.find(".group_icons .icon_group_" + group.id).detach();

View file

@ -8,11 +8,13 @@ abstract class InfoManagerBase {
protected resetTimers() { protected resetTimers() {
for(let timer of this.timers) for(let timer of this.timers)
clearTimeout(timer); clearTimeout(timer);
this.timers = [];
} }
protected resetIntervals() { protected resetIntervals() {
for(let interval of this.intervals) for(let interval of this.intervals)
clearInterval(interval); clearInterval(interval);
this.intervals = [];
} }
protected registerTimer(timer: NodeJS.Timer) { protected registerTimer(timer: NodeJS.Timer) {
@ -116,7 +118,7 @@ class ClientInfoManager extends InfoManager<ClientEntry> {
let properties = this.buildProperties(client); let properties = this.buildProperties(client);
let rendered = $("#tmpl_selected_client").renderTag([properties]); let rendered = $("#tmpl_selected_client").renderTag(properties);
html_tag.append(rendered); html_tag.append(rendered);
this.registerInterval(setInterval(() => { this.registerInterval(setInterval(() => {

View file

@ -864,7 +864,7 @@
{{for group_server}} {{for group_server}}
<div style="display: flex; margin-top: 1px; margin-left: 10px; align-items: center;"> <div style="display: flex; margin-top: 1px; margin-left: 10px; align-items: center;">
<node key="group_{{:group_id}}_icon"/> <node key="group_{{:group_id}}_icon"/>
<div style="margin-left: 3px">{{:group_name}}</div> <div style="margin-left: 3px">{{>group_name}}</div>
</div> </div>
{{/for}} {{/for}}
</div> </div>