mirror of
https://github.com/qinglong-app/qinglong_app.git
synced 2025-10-09 16:48:19 +08:00
修改bug
This commit is contained in:
@@ -152,9 +152,12 @@ class _TaskDetailPageState extends ConsumerState<TaskDetailPage> {
|
||||
[
|
||||
GestureDetector(
|
||||
behavior: HitTestBehavior.opaque,
|
||||
onTap: () {
|
||||
onTap: () async{
|
||||
Navigator.of(context).pop();
|
||||
startCron(context, ref);
|
||||
await startCron(context, ref);
|
||||
setState(() {
|
||||
|
||||
});
|
||||
},
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
@@ -177,6 +180,7 @@ class _TaskDetailPageState extends ConsumerState<TaskDetailPage> {
|
||||
onTap: () {
|
||||
Navigator.of(context).pop();
|
||||
showLog();
|
||||
|
||||
},
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
|
||||
@@ -92,6 +92,8 @@ class TaskViewModel extends BaseViewModel {
|
||||
HttpResponse<NullResponse> response = await Api.unpinTask(sId);
|
||||
|
||||
if (response.success) {
|
||||
"取消置顶成功".toast();
|
||||
list.firstWhere((element) => element.sId == sId).isPinned = 0;
|
||||
sortList();
|
||||
success();
|
||||
} else {
|
||||
@@ -101,6 +103,8 @@ class TaskViewModel extends BaseViewModel {
|
||||
HttpResponse<NullResponse> response = await Api.pinTask(sId);
|
||||
|
||||
if (response.success) {
|
||||
"置顶成功".toast();
|
||||
list.firstWhere((element) => element.sId == sId).isPinned = 1;
|
||||
sortList();
|
||||
success();
|
||||
} else {
|
||||
@@ -114,6 +118,7 @@ class TaskViewModel extends BaseViewModel {
|
||||
HttpResponse<NullResponse> response = await Api.disableTask(sId);
|
||||
|
||||
if (response.success) {
|
||||
"禁用成功".toast();
|
||||
list.firstWhere((element) => element.sId == sId).isDisabled = 1;
|
||||
sortList();
|
||||
success();
|
||||
@@ -124,6 +129,7 @@ class TaskViewModel extends BaseViewModel {
|
||||
HttpResponse<NullResponse> response = await Api.enableTask(sId);
|
||||
|
||||
if (response.success) {
|
||||
"启用成功".toast();
|
||||
list.firstWhere((element) => element.sId == sId).isDisabled = 0;
|
||||
sortList();
|
||||
success();
|
||||
|
||||
Reference in New Issue
Block a user