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
path: root/src
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2021-12-10 15:33:28 +0300
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2021-12-10 15:46:08 +0300
commit7c7a74c22a23ebb70291071f42585231d5edadb6 (patch)
tree4b2a8803c8cddd2d4c07401714ba868878f9f5ed /src
parentf1c9471dc94399e8c4bd6e373329da4d5e498a38 (diff)
Revert "Await adding the participant before updating the user status"
This reverts commit afd9e069249a3bed9e6dfcde73f4aa47d4779339 (but keeping the extra details in the logs). "purgeParticipantsStore" and "addParticipant" are synchronous operations, so there is no need to wait for them. Doing so causes the removal of the participants and adding each participant again to happen in a different "tick", so Vue computed properties are updated to intermediate values (for example, the current participant switches from being in the conversation to not being in the conversation and back again). This seemed to fix an issue when updating the user status, but only because the issue needs a specific sequence of steps to trigger it in a deterministic way, so probably it simply did not happen when it was tested.
Diffstat (limited to 'src')
-rw-r--r--src/components/RightSidebar/Participants/ParticipantsTab.vue8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/components/RightSidebar/Participants/ParticipantsTab.vue b/src/components/RightSidebar/Participants/ParticipantsTab.vue
index 3ca744e34..ba9b59da3 100644
--- a/src/components/RightSidebar/Participants/ParticipantsTab.vue
+++ b/src/components/RightSidebar/Participants/ParticipantsTab.vue
@@ -266,11 +266,11 @@ export default {
const { request, cancel } = CancelableRequest(fetchParticipants)
this.cancelGetParticipants = cancel
const participants = await request(token)
- await this.$store.dispatch('purgeParticipantsStore', token)
+ this.$store.dispatch('purgeParticipantsStore', token)
const hasUserStatuses = !!participants.headers['x-nextcloud-has-user-statuses']
- for (const participant of participants.data.ocs.data) {
- await this.$store.dispatch('addParticipant', {
+ participants.data.ocs.data.forEach(participant => {
+ this.$store.dispatch('addParticipant', {
token,
participant,
})
@@ -290,7 +290,7 @@ export default {
userId: participant.actorId,
})
}
- }
+ })
this.participantsInitialised = true
} catch (exception) {
if (!Axios.isCancel(exception)) {