[Android] Fix pinia subscription in remote access

Nicolas Pomepuy git at videolan.org
Thu Feb 22 13:29:25 UTC 2024


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Wed Jan 31 14:05:33 2024 +0100| [b1268dc3f69abad29fec59171795d8c11f67079f] | committer: Nicolas Pomepuy

Fix pinia subscription in remote access

> https://code.videolan.org/videolan/vlc-android/commit/b1268dc3f69abad29fec59171795d8c11f67079f
---

 buildsystem/network-sharing-server/src/pages/BrowseList.vue | 4 ++--
 buildsystem/network-sharing-server/src/pages/VideoList.vue  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/buildsystem/network-sharing-server/src/pages/BrowseList.vue b/buildsystem/network-sharing-server/src/pages/BrowseList.vue
index b93543772d..50f3bcba15 100644
--- a/buildsystem/network-sharing-server/src/pages/BrowseList.vue
+++ b/buildsystem/network-sharing-server/src/pages/BrowseList.vue
@@ -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
             }
diff --git a/buildsystem/network-sharing-server/src/pages/VideoList.vue b/buildsystem/network-sharing-server/src/pages/VideoList.vue
index d4e8853f8d..e579e2b56d 100644
--- a/buildsystem/network-sharing-server/src/pages/VideoList.vue
+++ b/buildsystem/network-sharing-server/src/pages/VideoList.vue
@@ -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
             }



More information about the Android mailing list