Fixed issue where cancelling a new blank task wouldn't refresh the list on tablets

pull/14/head
Sam Bosley 13 years ago
parent c5a2e867c5
commit fc71dc8be0

@ -939,8 +939,13 @@ ViewPager.OnPageChangeListener, EditNoteActivity.UpdatesChangedListener {
// abandon editing in this case // abandon editing in this case
if (title.getText().length() == 0 if (title.getText().length() == 0
|| TextUtils.isEmpty(model.getValue(Task.TITLE))) { || TextUtils.isEmpty(model.getValue(Task.TITLE))) {
if (isNewTask) if (isNewTask) {
taskService.delete(model); taskService.delete(model);
if (getActivity() instanceof TaskListActivity) {
TaskListActivity tla = (TaskListActivity) getActivity();
tla.refreshTaskList();
}
}
} }
showCancelToast(); showCancelToast();

Loading…
Cancel
Save