🐛:Fix delete bugs

This commit is contained in:
oldchen
2019-08-27 16:45:36 +08:00
parent 5f1cd11ba5
commit a608ffbba0
3 changed files with 16 additions and 3 deletions

View File

@ -158,7 +158,11 @@ class MainPageLogic {
}, },
failed: (CommonBean bean) { failed: (CommonBean bean) {
Navigator.of(_model.context).pop(); Navigator.of(_model.context).pop();
_showTextDialog(bean.description); if(bean.description.contains("任务不存在")){
_deleteDataBaseTask(taskBean);
} else {
_showTextDialog(bean.description);
}
}, },
error: (msg) { error: (msg) {
Navigator.of(_model.context).pop(); Navigator.of(_model.context).pop();

View File

@ -91,7 +91,11 @@ class SearchPageLogic{
}, },
failed: (CommonBean bean) { failed: (CommonBean bean) {
Navigator.of(_model.context).pop(); Navigator.of(_model.context).pop();
_showTextDialog(bean.description); if(bean.description.contains("任务不存在")){
doDelete(taskBean, globalModel);
} else {
_showTextDialog(bean.description);
}
}, },
error: (msg) { error: (msg) {
Navigator.of(_model.context).pop(); Navigator.of(_model.context).pop();

View File

@ -117,7 +117,12 @@ class TaskDetailPageLogic {
}, },
failed: (CommonBean bean) { failed: (CommonBean bean) {
Navigator.of(_model.context).pop(); Navigator.of(_model.context).pop();
_showTextDialog(bean.description, _model.context); if(bean.description.contains("任务不存在")){
deleteAndExit(mainPageModel);
} else {
_showTextDialog(bean.description, _model.context);
}
}, },
error: (msg) { error: (msg) {
Navigator.of(_model.context).pop(); Navigator.of(_model.context).pop();