fix(photo-ai): keep loading progress visible until result loads
This commit is contained in:
+1
-2
@@ -1592,8 +1592,7 @@ async function pollAiResult() {
|
||||
};
|
||||
img.onerror = () => showEnhanceResult(true);
|
||||
img.src = API + data.photo_path;
|
||||
const loadingEl = document.getElementById('enhanceLoading');
|
||||
if (loadingEl) loadingEl.style.display = 'none';
|
||||
setEnhanceLoadingProgress(100, 'Загрузка результата...');
|
||||
showToast('ИИ результат готов');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1167,8 +1167,7 @@ async function runPhotoAi() {
|
||||
if (s.status === 'done') {
|
||||
doneHandled = true;
|
||||
clearInterval(photoAiPollTimer);
|
||||
const loadingEl = document.getElementById('enhanceLoading');
|
||||
if (loadingEl) loadingEl.style.display = 'none';
|
||||
setEnhanceLoadingProgress(100, 'Загрузка результата...');
|
||||
resolve(s);
|
||||
}
|
||||
else if (s.status === 'error') {
|
||||
|
||||
Reference in New Issue
Block a user