From a9bc22ce2991ef0927f492bcb681e34e37147371 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Tue, 28 Apr 2026 23:43:48 +0300 Subject: [PATCH] feature: cloudcmd: operation: rm useless checks --- client/modules/operation/set-listeners.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/client/modules/operation/set-listeners.js b/client/modules/operation/set-listeners.js index 431c7791..e54e7d14 100644 --- a/client/modules/operation/set-listeners.js +++ b/client/modules/operation/set-listeners.js @@ -15,15 +15,12 @@ export const setListeners = (options) => (emitter) => { } = options; let done; - let lastError; const onAbort = wraptile(({emitter, operation}) => { emitter.abort(); const msg = `${operation} aborted`; - lastError = true; - Dialog.alert(msg, { cancel: false, }); @@ -40,13 +37,10 @@ export const setListeners = (options) => (emitter) => { operation, })); - let noProgress = true; - const listeners = { progress: (value) => { done = value === 100; progress.setProgress(value); - noProgress = false; }, end: () => { @@ -54,13 +48,10 @@ export const setListeners = (options) => (emitter) => { forEachKey(removeListener, listeners); progress.remove(); - if (lastError || done || noProgress) - callback(); + callback(); }, error: async (error) => { - lastError = error; - if (noContinue) { listeners.end(error); Dialog.alert(error);