mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-08 09:30:27 +00:00
feat: support start and pause all tasks (#121)
This commit is contained in:
1 parent
0e3ca912a7
commit
eb9d966855
13 files changed
+141
-1
No files matched your search
@@ -5,4 +5,5 @@ class CreateController extends GetxController {
|
||||
final RxList fileInfos = [].obs;
|
||||
final RxList selectedIndexes = [].obs;
|
||||
final RxList openedFolders = [].obs;
|
||||
final isResolving = false.obs;
|
||||
}
|
||||
@@ -115,9 +115,10 @@ class CreateView extends GetView<CreateController> {
|
||||
}
|
||||
|
||||
Future<void> _doResolve() async {
|
||||
if (_confirmController.currentState == ButtonState.loading) {
|
||||
if (controller.isResolving.value) {
|
||||
return;
|
||||
}
|
||||
controller.isResolving.value = true;
|
||||
try {
|
||||
_confirmController.start();
|
||||
if (_resolveFormKey.currentState!.validate()) {
|
||||
@@ -130,6 +131,7 @@ class CreateView extends GetView<CreateController> {
|
||||
showErrorMessage(e);
|
||||
} finally {
|
||||
_confirmController.reset();
|
||||
controller.isResolving.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user