mirror of
https://github.com/asjqkkkk/flutter-todos.git
synced 2025-08-06 14:19:24 +08:00
🐛:Fix delete bugs
This commit is contained in:
@ -158,7 +158,11 @@ class MainPageLogic {
|
|||||||
},
|
},
|
||||||
failed: (CommonBean bean) {
|
failed: (CommonBean bean) {
|
||||||
Navigator.of(_model.context).pop();
|
Navigator.of(_model.context).pop();
|
||||||
|
if(bean.description.contains("任务不存在")){
|
||||||
|
_deleteDataBaseTask(taskBean);
|
||||||
|
} else {
|
||||||
_showTextDialog(bean.description);
|
_showTextDialog(bean.description);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
error: (msg) {
|
error: (msg) {
|
||||||
Navigator.of(_model.context).pop();
|
Navigator.of(_model.context).pop();
|
||||||
|
@ -91,7 +91,11 @@ class SearchPageLogic{
|
|||||||
},
|
},
|
||||||
failed: (CommonBean bean) {
|
failed: (CommonBean bean) {
|
||||||
Navigator.of(_model.context).pop();
|
Navigator.of(_model.context).pop();
|
||||||
|
if(bean.description.contains("任务不存在")){
|
||||||
|
doDelete(taskBean, globalModel);
|
||||||
|
} else {
|
||||||
_showTextDialog(bean.description);
|
_showTextDialog(bean.description);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
error: (msg) {
|
error: (msg) {
|
||||||
Navigator.of(_model.context).pop();
|
Navigator.of(_model.context).pop();
|
||||||
|
@ -117,7 +117,12 @@ class TaskDetailPageLogic {
|
|||||||
},
|
},
|
||||||
failed: (CommonBean bean) {
|
failed: (CommonBean bean) {
|
||||||
Navigator.of(_model.context).pop();
|
Navigator.of(_model.context).pop();
|
||||||
|
if(bean.description.contains("任务不存在")){
|
||||||
|
deleteAndExit(mainPageModel);
|
||||||
|
} else {
|
||||||
_showTextDialog(bean.description, _model.context);
|
_showTextDialog(bean.description, _model.context);
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
error: (msg) {
|
error: (msg) {
|
||||||
Navigator.of(_model.context).pop();
|
Navigator.of(_model.context).pop();
|
||||||
|
Reference in New Issue
Block a user