diff --git a/src/app/components/setting-tile/SettingTile.tsx b/src/app/components/setting-tile/SettingTile.tsx index f22fcd995..36c1dcce0 100644 --- a/src/app/components/setting-tile/SettingTile.tsx +++ b/src/app/components/setting-tile/SettingTile.tsx @@ -43,7 +43,9 @@ export function SettingTile({ title, description, before, after, children }: Set )} {description && ( - + // [Gitea #291] A
, not a

: many tiles pass blocks (badges, + // , ) as the description, which is invalid inside a

. + {description} )} diff --git a/src/app/components/upload-card/UploadCardRenderer.tsx b/src/app/components/upload-card/UploadCardRenderer.tsx index c399d08c3..2b0dd7d0a 100644 --- a/src/app/components/upload-card/UploadCardRenderer.tsx +++ b/src/app/components/upload-card/UploadCardRenderer.tsx @@ -310,9 +310,13 @@ export function UploadCardRenderer({ const { file } = upload; const fileSizeExceeded = file.size >= allowSize; - if (upload.status === UploadStatus.Idle && !fileSizeExceeded) { - startUpload(); - } + // [Gitea #291] Start in an effect, not during render: the desktop taskbar + // progress hook subscribes to the upload atoms, so a render-time start + // updated another component mid-render (React warning on every image send). + const idle = upload.status === UploadStatus.Idle; + useEffect(() => { + if (idle && !fileSizeExceeded) startUpload(); + }, [idle, fileSizeExceeded, startUpload]); const handleSpoiler = (marked: boolean) => { setMetadata(fileItem, { ...metadata, markedAsSpoiler: marked });