summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/components/RightSidebar/Participants/ParticipantsTab.vue24
-rw-r--r--src/components/RightSidebar/RightSidebar.vue1
2 files changed, 23 insertions, 2 deletions
diff --git a/src/components/RightSidebar/Participants/ParticipantsTab.vue b/src/components/RightSidebar/Participants/ParticipantsTab.vue
index 18fb8626d..dea5e909b 100644
--- a/src/components/RightSidebar/Participants/ParticipantsTab.vue
+++ b/src/components/RightSidebar/Participants/ParticipantsTab.vue
@@ -86,6 +86,10 @@ export default {
type: Boolean,
required: true,
},
+ isActive: {
+ type: Boolean,
+ required: true,
+ },
},
data() {
@@ -183,11 +187,27 @@ export default {
}
}, 250),
- debounceUpdateParticipants: debounce(function() {
+ debounceUpdateParticipants() {
+ if (!this.$store.getters.windowIsVisible()
+ || !this.$store.getters.getSidebarStatus
+ || !this.isActive) {
+ this.debounceSlowUpdateParticipants()
+ }
+
+ this.debounceFastUpdateParticipants()
+ },
+
+ debounceSlowUpdateParticipants: debounce(function() {
+ if (!this.fetchingParticipants) {
+ this.cancelableGetParticipants()
+ }
+ }, 15000),
+
+ debounceFastUpdateParticipants: debounce(function() {
if (!this.fetchingParticipants) {
this.cancelableGetParticipants()
}
- }, 2000),
+ }, 3000),
async fetchSearchResults() {
try {
diff --git a/src/components/RightSidebar/RightSidebar.vue b/src/components/RightSidebar/RightSidebar.vue
index 2313beac1..acf8579b6 100644
--- a/src/components/RightSidebar/RightSidebar.vue
+++ b/src/components/RightSidebar/RightSidebar.vue
@@ -52,6 +52,7 @@
:name="t('spreed', 'Participants')"
icon="icon-contacts-dark">
<ParticipantsTab
+ :is-active="activeTab === 'participants'"
:can-search="canSearchParticipants"
:can-add="canAddParticipants" />
</AppSidebarTab>