Merge branch 'fix-excessive-reregistrations' into 'develop'
Fix rogue nested watcher triggering notifications registering too often Closes #1159 See merge request pleroma/pleroma-fe!1708
This commit is contained in:
commit
eae62e2eb8
@ -41,7 +41,13 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
update (e) {
|
update (e) {
|
||||||
|
const [firstSegment, ...rest] = this.path.split('.')
|
||||||
set(this.$parent, this.path, e)
|
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 () {
|
reset () {
|
||||||
set(this.$parent, this.path, this.defaultState)
|
set(this.$parent, this.path, this.defaultState)
|
||||||
|
@ -38,15 +38,6 @@ const FilteringTab = {
|
|||||||
},
|
},
|
||||||
// Updating nested properties
|
// Updating nested properties
|
||||||
watch: {
|
watch: {
|
||||||
notificationVisibility: {
|
|
||||||
handler (value) {
|
|
||||||
this.$store.dispatch('setOption', {
|
|
||||||
name: 'notificationVisibility',
|
|
||||||
value: this.$store.getters.mergedConfig.notificationVisibility
|
|
||||||
})
|
|
||||||
},
|
|
||||||
deep: true
|
|
||||||
},
|
|
||||||
replyVisibility () {
|
replyVisibility () {
|
||||||
this.$store.dispatch('queueFlushAll')
|
this.$store.dispatch('queueFlushAll')
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user