From 907c3c76a200af9d5620bfa37bfb562d9905c5cb Mon Sep 17 00:00:00 2001
From: AkiraFukushima
Date: Tue, 26 Apr 2022 19:00:47 +0900
Subject: [PATCH] Fix watching array
---
.../components/TimelineSpace/Contents/Home.vue | 11 +++++++----
.../components/TimelineSpace/Contents/Mentions.vue | 11 +++++++----
.../TimelineSpace/Contents/Notifications.vue | 11 +++++++----
3 files changed, 21 insertions(+), 12 deletions(-)
diff --git a/src/renderer/components/TimelineSpace/Contents/Home.vue b/src/renderer/components/TimelineSpace/Contents/Home.vue
index a477415a..8a4b095c 100644
--- a/src/renderer/components/TimelineSpace/Contents/Home.vue
+++ b/src/renderer/components/TimelineSpace/Contents/Home.vue
@@ -163,10 +163,13 @@ export default {
this.$store.commit('TimelineSpace/Contents/Home/changeHeading', true)
}
},
- timeline: function (newState, _oldState) {
- if (this.heading && newState.length > 0) {
- this.$store.dispatch('TimelineSpace/Contents/Home/saveMarker')
- }
+ timeline: {
+ handler(newState, _oldState) {
+ if (this.heading && newState.length > 0) {
+ this.$store.dispatch('TimelineSpace/Contents/Home/saveMarker')
+ }
+ },
+ deep: true
}
},
methods: {
diff --git a/src/renderer/components/TimelineSpace/Contents/Mentions.vue b/src/renderer/components/TimelineSpace/Contents/Mentions.vue
index 8c4843b5..b9eff032 100644
--- a/src/renderer/components/TimelineSpace/Contents/Mentions.vue
+++ b/src/renderer/components/TimelineSpace/Contents/Mentions.vue
@@ -151,10 +151,13 @@ export default {
this.$store.commit('TimelineSpace/Contents/Mentions/changeHeading', true)
}
},
- mentions: function (newState, _oldState) {
- if (this.heading && newState.length > 0) {
- this.$store.dispatch('TimelineSpace/Contents/Mentions/saveMarker')
- }
+ mentions: {
+ handler(newState, _oldState) {
+ if (this.heading && newState.length > 0) {
+ this.$store.dispatch('TimelineSpace/Contents/Mentions/saveMarker')
+ }
+ },
+ deep: true
}
},
methods: {
diff --git a/src/renderer/components/TimelineSpace/Contents/Notifications.vue b/src/renderer/components/TimelineSpace/Contents/Notifications.vue
index d0ab6ca0..5edfab17 100644
--- a/src/renderer/components/TimelineSpace/Contents/Notifications.vue
+++ b/src/renderer/components/TimelineSpace/Contents/Notifications.vue
@@ -150,10 +150,13 @@ export default {
this.$store.dispatch('TimelineSpace/Contents/Notifications/resetBadge')
}
},
- notifications: function (newState, _oldState) {
- if (this.heading && newState.length > 0) {
- this.$store.dispatch('TimelineSpace/Contents/Notifications/saveMarker')
- }
+ notifications: {
+ handler(newState, _oldState) {
+ if (this.heading && newState.length > 0) {
+ this.$store.dispatch('TimelineSpace/Contents/Notifications/saveMarker')
+ }
+ },
+ deep: true
}
},
methods: {