diff --git a/ChangeLog.md b/ChangeLog.md index d932ee30..d2e887e5 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -3,6 +3,7 @@ - Added the permission system (Assignments and management) * Fixed poke and client description with empty message * Fixed channel tree icons + * Fixed group sorting * **26.09.18**: - Added Safari support diff --git a/js/permission/GroupManager.ts b/js/permission/GroupManager.ts index a2cd17d3..39d38590 100644 --- a/js/permission/GroupManager.ts +++ b/js/permission/GroupManager.ts @@ -82,9 +82,9 @@ class GroupManager { static sorter() : (a: Group, b: Group) => number { return (a, b) => { - if(a.properties.sortid < b.properties.sortid) - return 1; if(a.properties.sortid > b.properties.sortid) + return 1; + if(a.properties.sortid < b.properties.sortid) return -1; if(a.id < b.id) diff --git a/js/ui/client.ts b/js/ui/client.ts index d58270b0..c0b0cfbf 100644 --- a/js/ui/client.ts +++ b/js/ui/client.ts @@ -663,6 +663,8 @@ class LocalClientEntry extends ClientEntry { }, type: MenuEntryType.ENTRY }, + MenuEntry.HR(), + ...this.assignment_context(), MenuEntry.CLOSE(on_close) ); } diff --git a/js/ui/modal/ModalServerGroupDialog.ts b/js/ui/modal/ModalServerGroupDialog.ts index d7a09e43..9b14f3f1 100644 --- a/js/ui/modal/ModalServerGroupDialog.ts +++ b/js/ui/modal/ModalServerGroupDialog.ts @@ -7,7 +7,7 @@ namespace Modals { let groups = tag["groups"] = []; tag["client_name"] = client.clientNickName(); - for(let group of client.channelTree.client.groups.serverGroups) { + for(let group of client.channelTree.client.groups.serverGroups.sort(GroupManager.sorter())) { if(group.type != GroupType.NORMAL) continue; let entry = {} as any;