Closed mingXta closed 7 months ago
The editor generate mock progress may exceed 100. original code:
setGenerateProgress(p => { if (p < 90) return p + 20 * Math.random() if (p >= 90 && p < 100) return p + 1 * Math.random() window.setTimeout(() => setIsInpaintingLoading(false), 500) return p })
I changed 20 to 10 and 100 to 99:
setGenerateProgress(p => { if (p < 90) return p + 10 * Math.random() if (p >= 90 && p < 99) return p + 1 * Math.random() window.setTimeout(() => setIsInpaintingLoading(false), 500) return p })
The editor generate mock progress may exceed 100. original code:
I changed 20 to 10 and 100 to 99: