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:
authorVincent Petry <pvince81@yahoo.fr>2020-11-25 19:09:10 +0300
committerVincent Petry <vincent@nextcloud.com>2020-11-25 19:29:30 +0300
commitc0cc183fc8aca0c50f3f30af491b60db391e6d78 (patch)
treeb765700dd60b1f0c8ec1fe6c9eed2f00f4e452c0 /src/FilesSidebarCallViewApp.vue
parent59288cda483e623885ef1486d615bc323f1e0d10 (diff)
Introduce participant mixin
To remove duplication of the "get current participant" logic all over the place and also for future use. Signed-off-by: Vincent Petry <pvince81@yahoo.fr>
Diffstat (limited to 'src/FilesSidebarCallViewApp.vue')
-rw-r--r--src/FilesSidebarCallViewApp.vue14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/FilesSidebarCallViewApp.vue b/src/FilesSidebarCallViewApp.vue
index 8421a728e..7f5827c1e 100644
--- a/src/FilesSidebarCallViewApp.vue
+++ b/src/FilesSidebarCallViewApp.vue
@@ -31,11 +31,11 @@
</template>
<script>
-import { PARTICIPANT } from './constants'
import CallView from './components/CallView/CallView'
import PreventUnload from 'vue-prevent-unload'
import duplicateSessionHandler from './mixins/duplicateSessionHandler'
import isInCall from './mixins/isInCall'
+import participant from './mixins/participant'
import talkHashCheck from './mixins/talkHashCheck'
import '@nextcloud/dialogs/styles/toast.scss'
@@ -51,6 +51,7 @@ export default {
mixins: [
duplicateSessionHandler,
isInCall,
+ participant,
talkHashCheck,
],
@@ -106,17 +107,6 @@ export default {
return this.isInCall
},
- participant() {
- const participantIndex = this.$store.getters.getParticipantIndex(this.token, this.$store.getters.getParticipantIdentifier())
- if (participantIndex === -1) {
- return {
- inCall: PARTICIPANT.CALL_FLAG.DISCONNECTED,
- }
- }
-
- return this.$store.getters.getParticipant(this.token, participantIndex)
- },
-
warnLeaving() {
return !this.isLeavingAfterSessionConflict && this.showCallView
},