Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2020-11-17 23:39:26 +0300
committerGitHub <noreply@github.com>2020-11-17 23:39:26 +0300
commitd53064ad2d51500b22b757455e89b68968a1e32e (patch)
treec3bdb41772ccc2fa8c575fa8d50126b86ab2cb74
parentdac2460acad2483dc99230ff989fe0c67946a917 (diff)
parentacf25b6de053e8467cc8b3d2c0b9e9c4db8d973c (diff)
Merge pull request #4627 from nextcloud/backport/4625/stable20
[stable20] Sort call participants up
-rw-r--r--src/components/RightSidebar/Participants/CurrentParticipants/CurrentParticipants.vue11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/components/RightSidebar/Participants/CurrentParticipants/CurrentParticipants.vue b/src/components/RightSidebar/Participants/CurrentParticipants/CurrentParticipants.vue
index 7bc9814d9..67b077451 100644
--- a/src/components/RightSidebar/Participants/CurrentParticipants/CurrentParticipants.vue
+++ b/src/components/RightSidebar/Participants/CurrentParticipants/CurrentParticipants.vue
@@ -101,9 +101,10 @@ export default {
/**
* Sort two participants by:
- * - type (moderators before normal participants)
* - online status
- * - user status (away + dnd at the end)
+ * - in call
+ * - type (moderators before normal participants)
+ * - user status (dnd at the end)
* - display name
*
* @param {object} participant1 First participant
@@ -133,6 +134,12 @@ export default {
return -1
}
+ const p1inCall = participant1.inCall !== PARTICIPANT.CALL_FLAG.DISCONNECTED
+ const p2inCall = participant2.inCall !== PARTICIPANT.CALL_FLAG.DISCONNECTED
+ if (p1inCall !== p2inCall) {
+ return p1inCall ? -1 : 1
+ }
+
const moderatorTypes = [PARTICIPANT.TYPE.OWNER, PARTICIPANT.TYPE.MODERATOR, PARTICIPANT.TYPE.GUEST_MODERATOR]
const moderator1 = moderatorTypes.indexOf(participant1.participantType) !== -1
const moderator2 = moderatorTypes.indexOf(participant2.participantType) !== -1