fix(ui): fix channel page infinite loop after upload
Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2307>
This commit is contained in:
parent
d3fda52e4f
commit
61af75d712
|
@ -91,9 +91,12 @@ const fetchData = async () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
watch(() => props.id, fetchData, { immediate: true })
|
watch(() => props.id, fetchData, { immediate: true })
|
||||||
watchEffect(() => {
|
|
||||||
const publication = store.state.channels.latestPublication
|
const uuid = computed(() => store.state.channels.latestPublication?.channel.uuid)
|
||||||
if (publication?.uploads && publication.channel.uuid === object.value?.uuid) {
|
watch([uuid, object], ([uuid, object], [lastUuid, lastObject]) => {
|
||||||
|
if (object?.uuid && object.uuid === lastObject?.uuid) return
|
||||||
|
|
||||||
|
if (uuid && uuid === object?.uuid) {
|
||||||
fetchData()
|
fetchData()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue