diff --git a/bigbluebutton-html5/imports/ui/components/connection-status/service.js b/bigbluebutton-html5/imports/ui/components/connection-status/service.js index 3fd7efbe351d12d2e5edb0bf247f3822d466c3b1..4df10074e035b560bfa3d45f5ed9906d5b11fd39 100644 --- a/bigbluebutton-html5/imports/ui/components/connection-status/service.js +++ b/bigbluebutton-html5/imports/ui/components/connection-status/service.js @@ -142,6 +142,12 @@ const sortLevel = (a, b) => { if (indexOfA > indexOfB) return -1; }; +const sortOffline = (a, b) => { + if (a.offline && !b.offline) return 1; + if (a.offline === b.offline) return 0; + if (!a.offline && b.offline) return -1; +}; + const getMyConnectionStatus = () => { const myConnectionStatus = ConnectionStatus.findOne( { @@ -245,7 +251,7 @@ const getConnectionStatus = () => { } return result; - }, []).sort(sortLevel); + }, []).sort(sortLevel).sort(sortOffline); }; const isEnabled = () => STATS.enabled;