1
0

fix: directly set arrays, objects and delete directly

Not needed since vue3 uses proxies
This commit is contained in:
Dominik Pschenitschni
2021-08-19 21:35:38 +02:00
parent 2b20f328cb
commit db49b9b532
33 changed files with 104 additions and 113 deletions

View File

@ -104,8 +104,8 @@ export default {
return
}
// This is an extra method to reset a few things when searching to not break loading more photos.
this.$set(this, 'backgroundSearchResult', [])
this.$set(this, 'backgroundThumbs', {})
this.backgroundSearchResult = []
this.backgroundThumbs = {}
this.searchBackgrounds()
},
searchBackgrounds(page = 1) {
@ -124,7 +124,7 @@ export default {
r.forEach(b => {
this.backgroundService.thumb(b)
.then(t => {
this.$set(this.backgroundThumbs, b.id, t)
this.backgroundThumbs[b.id] = t
})
})
})

View File

@ -106,7 +106,7 @@ export default {
this.listService.get(list)
.then(r => {
this.$set(this, 'list', r)
this.list = r
this.$store.commit(CURRENT_LIST, r)
this.setTitle(this.$t('list.edit.title', {list: this.list.title}))
})

View File

@ -61,7 +61,7 @@ export default {
this.listService.get(list)
.then(r => {
this.$set(this, 'list', r)
this.list = r
this.$store.commit(CURRENT_LIST, r)
// This will trigger the dynamic loading of components once we actually have all the data to pass to them
this.manageTeamsComponent = 'userTeam'