Skip to content

Commit

Permalink
fix(CallView): remove force setting call view mode in order to keep t…
Browse files Browse the repository at this point in the history
…he previous isGrid last state accurate.

Signed-off-by: DorraJaouad <[email protected]>
  • Loading branch information
DorraJaouad authored and Antreesy committed May 13, 2024
1 parent 675cf98 commit d047542
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 18 deletions.
12 changes: 0 additions & 12 deletions src/components/CallView/CallView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -397,18 +397,6 @@ export default {
}
},

showSelectedVideo(newVal) {
if (newVal) {
this.$store.dispatch('setCallViewMode', { isGrid: false })
}
},

showSelectedScreen(newVal) {
if (newVal) {
this.$store.dispatch('setCallViewMode', { isGrid: false })
}
},

presenterVideoBlockerEnabled(value) {
this.showPresenterOverlay = value
},
Expand Down
6 changes: 3 additions & 3 deletions src/components/CallView/Grid/Grid.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@
<LocalVideo v-if="!isStripe && !isRecording && !screenshotMode"
ref="localVideo"
class="video"
:is-grid="true"
:fit-video="isStripe"
is-grid
:fit-video="false"
:token="token"
:local-media-model="localMediaModel"
:local-call-participant-model="localCallParticipantModel"
Expand Down Expand Up @@ -801,7 +801,7 @@ export default {
},

handleClickStripeCollapse() {
this.$store.dispatch('setCallViewMode', { isStripeOpen: !this.stripeOpen })
this.$store.dispatch('setCallViewMode', { isStripeOpen: !this.stripeOpen, clearLast: false })
},

handleMovement() {
Expand Down
5 changes: 2 additions & 3 deletions src/store/callViewStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,17 +156,16 @@ const actions = {
if (clearLast) {
context.commit('lastIsGrid', null)
context.commit('lastIsStripeOpen', null)
} else {
context.commit('lastIsGrid', context.getters.isGrid)
context.commit('lastIsStripeOpen', context.getters.isStripeOpen)
}

if (isGrid !== null) {
context.commit('lastIsGrid', context.getters.isGrid)
BrowserStorage.setItem('callprefs-' + context.getters.getToken() + '-isgrid', isGrid)
context.commit('isGrid', isGrid)
}

if (isStripeOpen !== null) {
context.commit('lastIsStripeOpen', context.getters.isStripeOpen)
context.commit('isStripeOpen', isStripeOpen)
}
},
Expand Down

0 comments on commit d047542

Please sign in to comment.