fix(plex): a reshuffle survives a refresh landing mid-deal; the ↻ spins for a deal only
The ↻ intent was spent as its fetch set out, so a watched toggle's resync cancelling that fetch re-ran it as a re-read of the old draw. It now lasts until the latest deal answers. The button spun on every re-read of the same titles; it now follows the deal. Comments that said the Surprise draw is never refetched are brought in line.
This commit is contained in:
@@ -7,10 +7,9 @@ import { notifyActionError } from "./actionErrors";
|
||||
// `resync` (invalidate) — which corrects the optimistic flip to truth either way. Shared by the
|
||||
// browse grid and the person page, each of which owns a different cache shape.
|
||||
//
|
||||
// `revert` is for state `resync` cannot correct, called on a failure only to put the card back: a
|
||||
// cache it must NOT refetch — a random draw (Discover's Surprise rail), which a refetch would
|
||||
// reshuffle under the viewer — or a component's local copy of the rows (a Plex playlist), which an
|
||||
// identical refetch never re-seeds (react-query keeps the same `data`).
|
||||
// `revert` is called on a failure only, to put the card back where `resync` does not, or not at once:
|
||||
// a component's local copy of the rows (a Plex playlist), which an identical refetch never re-seeds
|
||||
// (react-query keeps the same `data`), or a cache whose refetch lands later than the click's answer.
|
||||
export async function toggleWatchState(
|
||||
card: PlexCard,
|
||||
t: TFunction,
|
||||
|
||||
Reference in New Issue
Block a user