From a804c51c88c6b88eb9f0f2b2ee762a05698e73f1 Mon Sep 17 00:00:00 2001 From: Sam Bosley Date: Fri, 17 Feb 2012 20:20:27 -0800 Subject: [PATCH] Fixed a bug where push task could be called in infinite recursion by activity tab, other small things --- .../com/todoroo/astrid/notes/EditNoteActivity.java | 3 ++- astrid/res/layout/control_set_assigned.xml | 1 + .../com/todoroo/astrid/activity/TaskListActivity.java | 2 +- astrid/src/com/todoroo/astrid/ui/QuickAddBar.java | 9 ++++++++- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/astrid/plugin-src/com/todoroo/astrid/notes/EditNoteActivity.java b/astrid/plugin-src/com/todoroo/astrid/notes/EditNoteActivity.java index 5280e5790..81ae8e8dd 100644 --- a/astrid/plugin-src/com/todoroo/astrid/notes/EditNoteActivity.java +++ b/astrid/plugin-src/com/todoroo/astrid/notes/EditNoteActivity.java @@ -406,11 +406,12 @@ public class EditNoteActivity extends LinearLayout implements TimerActionListene } // push task if it hasn't been pushed - if(task.getValue(Task.REMOTE_ID) == 0) { + if(task.getValue(Task.REMOTE_ID) == 0 && !TextUtils.isEmpty(task.getValue(Task.TITLE))) { new Thread(new Runnable() { @Override public void run() { actFmSyncService.pushTask(task.getId()); + task = PluginServices.getTaskService().fetchById(task.getId(), Task.NOTES, Task.ID, Task.REMOTE_ID, Task.TITLE); refreshData(false, callback); } }).start(); diff --git a/astrid/res/layout/control_set_assigned.xml b/astrid/res/layout/control_set_assigned.xml index 26206ccc7..76a460c9d 100644 --- a/astrid/res/layout/control_set_assigned.xml +++ b/astrid/res/layout/control_set_assigned.xml @@ -15,6 +15,7 @@ android:layout_height="wrap_content" android:layout_marginTop="2dip" android:layout_weight="1" + android:textColor="@android:color/black" android:hint="@string/actfm_person_hint" /> 0) fragment.showTaskEditHelpPopover(); + if (activity instanceof TaskListActivity && !assignedToMe) + ((TaskListActivity) activity).switchToAssignedFilter(assignedTo); + TextView quickAdd = (TextView) findViewById(R.id.quickAddText); quickAdd.setText(""); //$NON-NLS-1$