mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
fix: progress bar not showing during stitch processing
setError() in the file store unconditionally set processing to false, even when called with null to clear a previous error. This meant setProcessing(true) followed by setError(null) at the start of processing would immediately kill the processing state, preventing the progress bar from ever rendering. Fix setError to only reset processing when there is an actual error. This also fixes the same latent bug in 10+ other custom tool settings components that call setProcessing before setError.
This commit is contained in:
@@ -28,8 +28,8 @@ export function StitchSettings() {
|
||||
const handleProcess = async () => {
|
||||
if (files.length < 2) return;
|
||||
|
||||
setProcessing(true);
|
||||
setError(null);
|
||||
setProcessing(true);
|
||||
setDownloadUrl(null);
|
||||
setUploadProgress(0);
|
||||
|
||||
|
||||
@@ -269,7 +269,7 @@ export const useFileStore = create<FileState>((set, get) => ({
|
||||
|
||||
setProcessing: (v) => set({ processing: v }),
|
||||
|
||||
setError: (e) => set({ error: e, processing: false }),
|
||||
setError: (e) => set(e ? { error: e, processing: false } : { error: null }),
|
||||
|
||||
setJobId: (_id) => {
|
||||
// no-op for backward compat
|
||||
|
||||
Reference in New Issue
Block a user