diff --git a/src/components.tsx b/src/components.tsx index 5325b9b..e444975 100644 --- a/src/components.tsx +++ b/src/components.tsx @@ -1018,6 +1018,14 @@ function PrintingsSection({ setCopies(await api.listLibraryCopies(card.oracle_id)); }); + // Copy groups that no longer fit are trimmed when the total drops, so + // refetch them along with it. + const adjustOwned = (delta: number) => + run(async () => { + setOwned(await api.addOwned(card.oracle_id, delta)); + setCopies(await api.listLibraryCopies(card.oracle_id)); + }); + const showPrinting = (scryfallId: string | null) => run(async () => { const entry = await api.setDeckCardPrinting(ctx.deckId!, card.oracle_id, scryfallId); @@ -1057,14 +1065,17 @@ function PrintingsSection({ )}