fix(attachments): clear visible file context when application changes

This commit is contained in:
cesnimda
2026-11-17 07:52:22 +01:00
parent c354e38b59
commit 2affeaca68
2 changed files with 36 additions and 0 deletions
@@ -108,6 +108,10 @@ export default function Attachments({ jobId }: { jobId: number }) {
owner.jobId = jobId;
owner.generation += 1;
setUploading(false);
setItems([]);
setLoadError(null);
setPreviewOpen(false);
setPreview(null);
return () => { owner.mounted = false; owner.generation += 1; };
}, [jobId]);