Skip to content
Snippets Groups Projects
Commit 3cba3587 authored by HJ's avatar HJ :fire:
Browse files

fix nested properties watcher being triggered far too often

parent 045a2221
No related branches found
No related tags found
2 merge requests!1711Update stable - 2.5.0 release,!1708Fix rogue nested watcher triggering notifications registering too often
Pipeline #43114 passed
......@@ -41,7 +41,13 @@ export default {
},
methods: {
update (e) {
const [firstSegment, ...rest] = this.path.split('.')
set(this.$parent, this.path, e)
// Updating nested properties does not trigger update on its parent.
// probably still not as reliable, but works for depth=1 at least
if (rest.length > 0) {
set(this.$parent, firstSegment, { ...get(this.$parent, firstSegment) })
}
},
reset () {
set(this.$parent, this.path, this.defaultState)
......
......@@ -38,15 +38,6 @@ const FilteringTab = {
},
// Updating nested properties
watch: {
notificationVisibility: {
handler (value) {
this.$store.dispatch('setOption', {
name: 'notificationVisibility',
value: this.$store.getters.mergedConfig.notificationVisibility
})
},
deep: true
},
replyVisibility () {
this.$store.dispatch('queueFlushAll')
}
......
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