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) <noreply@anthropic.com>
This commit is contained in:
fkwp
2026-09-17 23:01:54 +02:00
co-authored by Claude Opus 5
parent 31e67577b0
commit ea25cde725
+5 -8
View File
@@ -214,14 +214,11 @@ export const CallFooter: FC<FooterProps> = ({
const onAddBackgroundImage = useCallback( const onAddBackgroundImage = useCallback(
(file: File): void => { (file: File): void => {
// Chosen for the user straight away: they picked this picture to use it, // Added, not chosen. Whether picking a file should also put it on is
// and leaving it unselected would ask them to pick it twice. // still open, so this does the smaller thing: the image appears among
// the others and the user says when to wear it.
setBackgroundEffectError(undefined); setBackgroundEffectError(undefined);
addBackground(file) addBackground(file).catch((e) => {
.then((id) =>
selectBackgroundEffect?.(serializeEffect({ kind: "added", id })),
)
.catch((e) => {
// TODO: FR-021 wants the user told what went wrong. There is no // 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 // surface for that in the menu yet, and inventing one is design's
// call, so for now this is only logged. // call, so for now this is only logged.
@@ -234,7 +231,7 @@ export const CallFooter: FC<FooterProps> = ({
); );
}); });
}, },
[addBackground, selectBackgroundEffect, whyRefused], [addBackground, whyRefused],
); );
// The catalogue is named here rather than in the view model: the names are // The catalogue is named here rather than in the view model: the names are