Skip to content
Snippets Groups Projects
Commit b1268dc3 authored by Nicolas Pomepuy's avatar Nicolas Pomepuy
Browse files

Fix pinia subscription in remote access

parent ea42816a
No related branches found
No related tags found
1 merge request!1833Implement the video grouping in the remote access
......@@ -226,8 +226,8 @@ export default {
},
mounted: function () {
this.appStore.$subscribe((mutation, state) => {
console.log(`Something changed in the app store: ${mutation} -> ${state}`)
if (mutation.events.key == "needRefresh" && mutation.events.newValue === true) {
if (state.needRefresh) {
this.$log.log(`A stream has changed!! Reloading with: ${JSON.stringify(state)}`)
this.fetchStreams();
this.appStore.needRefresh = false
}
......
......@@ -83,8 +83,8 @@ export default {
},
mounted: function () {
this.appStore.$subscribe((mutation, state) => {
this.$log.log(`Something changed in the app store: ${mutation.events.key} -> ${state}`)
if (mutation.events.key == "needRefresh" && mutation.events.newValue === true) {
this.$log.log(`Something changed in the app store: ${JSON.stringify(state)}`)
if (state.needRefresh) {
this.fetchVideos();
this.appStore.needRefresh = false
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment