Commit eccd1b36 authored by Kourser's avatar Kourser
Browse files

Fix episodes vanishing on re-entry (cancelled DB read clobbering)



Root cause (reproduced deterministically): GRDB's async reads honour task
cancellation. Returning to a podcast quickly cancels the detail's `.task`, so the
episode query threw CancellationError, which was turned into an empty list and
written over the displayed episodes — hence "Aucun épisode" until a manual
refresh.

Fix: in PodcastDetailView, never overwrite the list when the load was cancelled
(guard `Task.isCancelled` after each await; only treat a non-cancelled empty
result as "no episodes"). reloadFromStore likewise bails on cancellation.

51 package tests green; iOS + macOS build; verified with a scripted
open → back → re-open flow (episodes now persist on screen).

Co-Authored-By: default avatarClaude <claude@anthropic.com>
parent 9a4ad624
Loading
Loading
Loading
Loading