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:
authorJoas Schilling <coding@schilljs.com>2020-06-24 15:19:00 +0300
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2020-07-01 14:11:39 +0300
commit8846755b2f99d6d2c7cd14b19332e616cd7f1c2c (patch)
tree6107c1ce79c33217fdf6ad8bec142917d9de5a45 /src/FilesSidebarCallViewApp.vue
parent5733c497a9dda035a5a9633b0d93c336e2291440 (diff)
Trigger a vue event when SessionStorage "joined_conversation" changes
Otherwise there is no update of the computed and the call screen will not show up. Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'src/FilesSidebarCallViewApp.vue')
-rw-r--r--src/FilesSidebarCallViewApp.vue32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/FilesSidebarCallViewApp.vue b/src/FilesSidebarCallViewApp.vue
index 24e2e9fff..7ad620281 100644
--- a/src/FilesSidebarCallViewApp.vue
+++ b/src/FilesSidebarCallViewApp.vue
@@ -23,7 +23,7 @@
<template>
<div v-if="isInFile">
<CallView
- v-show="isInCall"
+ v-show="showCallView"
:token="token"
:is-sidebar="true" />
<PreventUnload :when="warnLeaving" />
@@ -36,8 +36,8 @@ import CallView from './components/CallView/CallView'
import PreventUnload from 'vue-prevent-unload'
import browserCheck from './mixins/browserCheck'
import duplicateSessionHandler from './mixins/duplicateSessionHandler'
+import isInCall from './mixins/isInCall'
import talkHashCheck from './mixins/talkHashCheck'
-import SessionStorage from './services/SessionStorage'
export default {
@@ -51,6 +51,7 @@ export default {
mixins: [
browserCheck,
duplicateSessionHandler,
+ isInCall,
talkHashCheck,
],
@@ -93,39 +94,38 @@ export default {
* otherwise.
*/
isInFile() {
- if (this.fileId !== this.fileIdForToken) {
- return false
- }
-
- return true
+ return this.fileId === this.fileIdForToken
},
- isInCall() {
+ showCallView() {
// FIXME Remove participants as soon as the file changes so this
// condition is not needed.
if (!this.isInFile) {
return false
}
+ return this.isInCall
+ },
+
+ participant() {
const participantIndex = this.$store.getters.getParticipantIndex(this.token, this.$store.getters.getParticipantIdentifier())
if (participantIndex === -1) {
- return false
+ return {
+ inCall: PARTICIPANT.CALL_FLAG.DISCONNECTED,
+ }
}
- const participant = this.$store.getters.getParticipant(this.token, participantIndex)
-
- return SessionStorage.getItem('joined_conversation') === this.token
- && participant.inCall !== PARTICIPANT.CALL_FLAG.DISCONNECTED
+ return this.$store.getters.getParticipant(this.token, participantIndex)
},
warnLeaving() {
- return !this.isLeavingAfterSessionConflict && this.isInCall
+ return !this.isLeavingAfterSessionConflict && this.showCallView
},
},
watch: {
- isInCall: function(isInCall) {
- if (isInCall) {
+ showCallView: function(showCallView) {
+ if (showCallView) {
this.replaceSidebarHeaderContentsWithCallView()
} else {
this.restoreSidebarHeaderContents()