Fixed a bug where rotating while creating a blank task could create a bunch of blank tasks

pull/14/head
Sam Bosley 12 years ago
parent 0d79623c32
commit 6504ce3f4d

@ -271,10 +271,11 @@ public class AstridActivity extends FragmentActivity
getSupportFragmentManager().executePendingTransactions(); getSupportFragmentManager().executePendingTransactions();
} }
}); });
} } else {
editActivity.save(true); editActivity.save(true);
editActivity.repopulateFromScratch(intent); editActivity.repopulateFromScratch(intent);
}
TaskListFragment tlf = getTaskListFragment(); TaskListFragment tlf = getTaskListFragment();
if (tlf != null) if (tlf != null)
tlf.loadTaskListContent(true); tlf.loadTaskListContent(true);

@ -724,7 +724,6 @@ ViewPager.OnPageChangeListener, EditNoteActivity.UpdatesChangedListener {
} }
long idParam = intent.getLongExtra(TOKEN_ID, -1L); long idParam = intent.getLongExtra(TOKEN_ID, -1L);
System.err.println("ID: " + idParam);
if (idParam > -1L) { if (idParam > -1L) {
model = taskService.fetchById(idParam, Task.PROPERTIES); model = taskService.fetchById(idParam, Task.PROPERTIES);
if (model != null && model.containsNonNullValue(Task.REMOTE_ID)) { 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 // not found by id or was never passed an id
if (model == null) { if (model == null) {
System.err.println("Model is null");
String valuesAsString = intent.getStringExtra(TOKEN_VALUES); String valuesAsString = intent.getStringExtra(TOKEN_VALUES);
ContentValues values = null; ContentValues values = null;
try { try {

Loading…
Cancel
Save