From ea25cde7259b95137b1cdf013d14bf49cf38e0e1 Mon Sep 17 00:00:00 2001 From: fkwp Date: Thu, 17 Sep 2026 19:40:40 +0200 Subject: [PATCH] Add a background without putting it on - Whether choosing a file should also wear it is still open, so this does the smaller thing: the image joins the others and the user says when - Reverts the auto-selection added earlier, which was never proven: the stories carry selection as a fixed arg, so nothing there could show it Co-Authored-By: Claude Opus 5 (1M context) --- src/components/CallFooter.tsx | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/src/components/CallFooter.tsx b/src/components/CallFooter.tsx index 884cf9b2f..645955995 100644 --- a/src/components/CallFooter.tsx +++ b/src/components/CallFooter.tsx @@ -214,27 +214,24 @@ export const CallFooter: FC = ({ const onAddBackgroundImage = useCallback( (file: File): void => { - // Chosen for the user straight away: they picked this picture to use it, - // and leaving it unselected would ask them to pick it twice. + // Added, not chosen. Whether picking a file should also put it on is + // still open, so this does the smaller thing: the image appears among + // the others and the user says when to wear it. setBackgroundEffectError(undefined); - addBackground(file) - .then((id) => - selectBackgroundEffect?.(serializeEffect({ kind: "added", id })), - ) - .catch((e) => { - // TODO: FR-021 wants the user told what went wrong. There is no - // surface for that in the menu yet, and inventing one is design's - // call, so for now this is only logged. - setBackgroundEffectError(whyRefused(e)); - logger.warn( - e instanceof UnusableImage - ? `Cannot use that file as a background: ${e.reason}` - : "Could not keep that background", - e, - ); - }); + addBackground(file).catch((e) => { + // TODO: FR-021 wants the user told what went wrong. There is no + // surface for that in the menu yet, and inventing one is design's + // call, so for now this is only logged. + setBackgroundEffectError(whyRefused(e)); + logger.warn( + e instanceof UnusableImage + ? `Cannot use that file as a background: ${e.reason}` + : "Could not keep that background", + e, + ); + }); }, - [addBackground, selectBackgroundEffect, whyRefused], + [addBackground, whyRefused], ); // The catalogue is named here rather than in the view model: the names are