wait for progress animation to finish

This commit is contained in:
unknown 2021-10-03 15:04:47 +02:00
parent c418a61133
commit 428d6ff975
No known key found for this signature in database
GPG Key ID: 1D070E0B09CFB257
2 changed files with 7 additions and 3 deletions

View File

@ -51,6 +51,7 @@ class StatusProvider extends ChangeNotifier {
if (!_stack.contains(Status.syncing)) { if (!_stack.contains(Status.syncing)) {
_stack.add(Status.syncing); _stack.add(Status.syncing);
_progress = 0.0;
notifyListeners(); notifyListeners();
} }
@ -61,9 +62,12 @@ class StatusProvider extends ChangeNotifier {
} }
if (_progress == 1.0) { if (_progress == 1.0) {
_stack.remove(Status.syncing);
_progress = 0.0;
notifyListeners(); notifyListeners();
// Wait for animation
Future.delayed(Duration(milliseconds: 250), () {
_stack.remove(Status.syncing);
notifyListeners();
});
} else if (progress != prev) notifyListeners(); } else if (progress != prev) notifyListeners();
} }
} }

@ -1 +1 @@
Subproject commit a0dcea3182921edc762a139225f584952cdbcb8d Subproject commit 2c0d51853dcee3c7113892d39f71c91d3783fa07