Skip to content

Commit

Permalink
🐛: Fix task-detail-page not exit correctly when there is no account!
Browse files Browse the repository at this point in the history
  • Loading branch information
asjqkkkk committed Sep 12, 2019
1 parent 37950a4 commit 2975a26
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions lib/logic/task_detail_page_logic.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,13 @@ class TaskDetailPageLogic {
});
}
_model.taskBean.changeTimes++;
DBProvider.db.updateTask(_model.taskBean).then((value) {
_model.taskBean.uniqueId == null
? mainPageModel.logic.postCreateTask(_model.taskBean)
: mainPageModel.logic.postUpdateTask(_model.taskBean);
DBProvider.db.updateTask(_model.taskBean).then((value) async{
final account = await SharedUtil.instance.getString(Keys.account) ?? 'default';
if(account != 'default'){
_model.taskBean.uniqueId == null
? mainPageModel.logic.postCreateTask(_model.taskBean)
: mainPageModel.logic.postUpdateTask(_model.taskBean);
}
///如果是从"完成列表"过来
if (_model.doneTaskPageModel != null) {
mainPageModel.logic.getTasks();
Expand Down

0 comments on commit 2975a26

Please sign in to comment.