From d2ff88d946e1da20c30c5316649a09bdc068dca1 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Fri, 22 Jan 2021 10:37:58 +0100 Subject: [PATCH] Sort buffers by network --- components/app.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/components/app.js b/components/app.js index b1e4da9..328e68b 100644 --- a/components/app.js +++ b/components/app.js @@ -69,6 +69,13 @@ function debounce(f, delay) { } function compareBuffers(a, b) { + if (a.network < b.network) { + return -1; + } + if (a.network > b.network) { + return 1; + } + if (a.type == BufferType.SERVER) { return -1; }