fix: fix episode ending status with watch
All checks were successful
repod / xml (push) Successful in 31s
repod / php (push) Successful in 1m13s
repod / nodejs (push) Successful in 1m18s
repod / release (push) Has been skipped

This commit is contained in:
Michel Roux 2024-08-16 23:50:36 +02:00
parent bd9e3691b9
commit 5742d1a762
2 changed files with 10 additions and 6 deletions

View File

@ -195,6 +195,15 @@ export default {
return decodeUrl(this.$route.params.url)
},
},
watch: {
episode() {
if (this.episode) {
this.episodes = this.episodes.map((e) =>
e.url === this.episode.url ? this.episode : e,
)
}
},
},
async mounted() {
try {
this.loading = true
@ -258,7 +267,6 @@ export default {
generateUrl('/apps/gpoddersync/episode_action/create'),
[episode.action],
)
this.updateList(episode)
if (read && this.episode && episode.url === this.episode.url) {
this.load(null)
}
@ -269,11 +277,6 @@ export default {
this.loadingAction = false
}
},
updateList(episode) {
this.episodes = this.episodes.map((e) =>
e.url === episode.url ? episode : e,
)
},
},
}
</script>

View File

@ -66,6 +66,7 @@ export const usePlayer = defineStore('player', {
pause() {
audio.pause()
this.paused = true
this.time()
},
play() {
audio.play()