diff --git a/components/buffer-list.js b/components/buffer-list.js index 353c1ff..10c456c 100644 --- a/components/buffer-list.js +++ b/components/buffer-list.js @@ -39,10 +39,28 @@ function BufferItem(props) { `; } +function compareBuffers(a, b) { + if (a.type == BufferType.SERVER) { + return -1; + } + if (b.type == BufferType.SERVER) { + return 1; + } + + if (a.name > b.name) { + return -1; + } + if (a.name < b.name) { + return 1; + } + + return 0; +} + export default function BufferList(props) { return html` diff --git a/components/member-list.js b/components/member-list.js index 8ead455..e605265 100644 --- a/components/member-list.js +++ b/components/member-list.js @@ -17,7 +17,7 @@ function MemberItem(props) { export default function MemberList(props) { return html`