fix(#425): track actual elapsed time in _cancellableBackoff (Gemini review)

pull/511/head
Strycher 2 months ago
parent 09c6b911b4
commit ae3792e6ee

@ -348,8 +348,9 @@ class TranslationService extends ChangeNotifier {
var waited = Duration.zero;
while (waited < total && !_cancelDownloadRequested) {
final remaining = total - waited;
await Future<void>.delayed(remaining < step ? remaining : step);
waited += step;
final chunk = remaining < step ? remaining : step;
await Future<void>.delayed(chunk);
waited += chunk;
}
}

Loading…
Cancel
Save

Powered by TurnKey Linux.