summaryrefslogtreecommitdiffstats
path: root/src/components/LeftSidebar/ConversationsList/ConversationsList.vue
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2021-04-28 17:23:06 +0200
committerVincent Petry <vincent@nextcloud.com>2021-04-28 17:23:06 +0200
commit726fd807fc22156d7cad0b0cae6b2c88543f79ff (patch)
tree0386e6a391cb80e5db9e97e473ffb6215f3322f4 /src/components/LeftSidebar/ConversationsList/ConversationsList.vue
parentd72448c5eb0b7273f40e1ce701f26110588cab0e (diff)
Decouple participantsService from the store
Moved joinConversation, leaveConversation and a few other dependencies to the participantsStore. Removes the dependency to the store from participantsService. There's a slight change of behavior: joinConversation in the service now also connects to signaling, and only when this is done the first action dispatch are done. In the previous implementation the store already received some updates before we even connected to signaling. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'src/components/LeftSidebar/ConversationsList/ConversationsList.vue')
-rw-r--r--src/components/LeftSidebar/ConversationsList/ConversationsList.vue5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/components/LeftSidebar/ConversationsList/ConversationsList.vue b/src/components/LeftSidebar/ConversationsList/ConversationsList.vue
index 66ac7251d..35b6711f0 100644
--- a/src/components/LeftSidebar/ConversationsList/ConversationsList.vue
+++ b/src/components/LeftSidebar/ConversationsList/ConversationsList.vue
@@ -40,7 +40,6 @@
import Conversation from './Conversation'
import Hint from '../../Hint'
import LoadingPlaceholder from '../../LoadingPlaceholder'
-import { joinConversation, leaveConversation } from '../../../services/participantsService'
import { EventBus } from '../../../services/EventBus'
export default {
@@ -111,10 +110,10 @@ export default {
return
}
if (from.name === 'conversation') {
- leaveConversation(from.params.token)
+ this.$store.dispatch('leaveConversation', { token: from.params.token })
}
if (to.name === 'conversation') {
- joinConversation(to.params.token)
+ this.$store.dispatch('joinConversation', { token: to.params.token })
}
},