From 6504ce3f4da534a9812c4b1efa3b4be41448faea Mon Sep 17 00:00:00 2001 From: Sam Bosley Date: Thu, 9 Aug 2012 16:17:22 -0700 Subject: [PATCH] Fixed a bug where rotating while creating a blank task could create a bunch of blank tasks --- astrid/src/com/todoroo/astrid/activity/AstridActivity.java | 5 +++-- astrid/src/com/todoroo/astrid/activity/TaskEditFragment.java | 2 -- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/astrid/src/com/todoroo/astrid/activity/AstridActivity.java b/astrid/src/com/todoroo/astrid/activity/AstridActivity.java index c86bcaa5e..f3380108e 100644 --- a/astrid/src/com/todoroo/astrid/activity/AstridActivity.java +++ b/astrid/src/com/todoroo/astrid/activity/AstridActivity.java @@ -271,10 +271,11 @@ public class AstridActivity extends FragmentActivity getSupportFragmentManager().executePendingTransactions(); } }); + } else { + editActivity.save(true); + editActivity.repopulateFromScratch(intent); } - editActivity.save(true); - editActivity.repopulateFromScratch(intent); TaskListFragment tlf = getTaskListFragment(); if (tlf != null) tlf.loadTaskListContent(true); diff --git a/astrid/src/com/todoroo/astrid/activity/TaskEditFragment.java b/astrid/src/com/todoroo/astrid/activity/TaskEditFragment.java index 11edc2ac9..86199ba77 100755 --- a/astrid/src/com/todoroo/astrid/activity/TaskEditFragment.java +++ b/astrid/src/com/todoroo/astrid/activity/TaskEditFragment.java @@ -724,7 +724,6 @@ ViewPager.OnPageChangeListener, EditNoteActivity.UpdatesChangedListener { } long idParam = intent.getLongExtra(TOKEN_ID, -1L); - System.err.println("ID: " + idParam); if (idParam > -1L) { model = taskService.fetchById(idParam, Task.PROPERTIES); if (model != null && model.containsNonNullValue(Task.REMOTE_ID)) { @@ -735,7 +734,6 @@ ViewPager.OnPageChangeListener, EditNoteActivity.UpdatesChangedListener { // not found by id or was never passed an id if (model == null) { - System.err.println("Model is null"); String valuesAsString = intent.getStringExtra(TOKEN_VALUES); ContentValues values = null; try {