Skip to content

Commit

Permalink
fixup! Fix(ParticipantsList): update list when needed
Browse files Browse the repository at this point in the history
  • Loading branch information
DorraJaouad committed Nov 7, 2023
1 parent cea14c6 commit f1df635
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/components/RightSidebar/Participants/ParticipantsTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,12 @@ export default {
watch: {
searchText(value) {
this.isFocused = !!value
},
isActive(value) {
if (value && this.pendingChanges) {
this.debounceUpdateParticipants()
}
}
},
Expand Down
5 changes: 4 additions & 1 deletion src/mixins/getParticipants.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const getParticipants = {
return {
participantsInitialised: false,
fetchingParticipants: false,
pendingChanges: false,
}
},

Expand Down Expand Up @@ -80,6 +81,8 @@ const getParticipants = {

debounceUpdateParticipants() {
if (!this.isActive && !this.isInCall) {
// Update is ignored but there is a flag to force the participants update
this.pendingChanges = true
return
}

Expand All @@ -88,7 +91,7 @@ const getParticipants = {
} else {
this.debounceSlowUpdateParticipants()
}

this.pendingChanges = false
},

debounceSlowUpdateParticipants: debounce(function() {
Expand Down

0 comments on commit f1df635

Please sign in to comment.