From 38da79055a7e9c192e36d369116ce9be00db1246 Mon Sep 17 00:00:00 2001 From: altmer Date: Sat, 22 Oct 2011 14:12:26 +0400 Subject: [PATCH] Changes to OpencrxControlSet to fix bug with Opencrx metadata --- .../com/todoroo/astrid/opencrx/OpencrxControlSet.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/astrid/plugin-src/com/todoroo/astrid/opencrx/OpencrxControlSet.java b/astrid/plugin-src/com/todoroo/astrid/opencrx/OpencrxControlSet.java index 61db47853..4a9b6662d 100644 --- a/astrid/plugin-src/com/todoroo/astrid/opencrx/OpencrxControlSet.java +++ b/astrid/plugin-src/com/todoroo/astrid/opencrx/OpencrxControlSet.java @@ -8,16 +8,16 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; +import android.widget.AdapterView.OnItemClickListener; import android.widget.ArrayAdapter; import android.widget.AutoCompleteTextView; import android.widget.Spinner; import android.widget.TextView; -import android.widget.AdapterView.OnItemClickListener; import com.timsu.astrid.R; -import com.todoroo.andlib.data.TodorooCursor; import com.todoroo.andlib.data.Property.LongProperty; import com.todoroo.andlib.data.Property.StringProperty; +import com.todoroo.andlib.data.TodorooCursor; import com.todoroo.andlib.service.Autowired; import com.todoroo.andlib.service.DependencyInjectionService; import com.todoroo.andlib.sql.Query; @@ -26,9 +26,9 @@ import com.todoroo.astrid.activity.TaskEditActivity.TaskEditControlSet; import com.todoroo.astrid.dao.StoreObjectDao; import com.todoroo.astrid.dao.StoreObjectDao.StoreObjectCriteria; import com.todoroo.astrid.data.Metadata; +import com.todoroo.astrid.data.MetadataApiDao.MetadataCriteria; import com.todoroo.astrid.data.StoreObject; import com.todoroo.astrid.data.Task; -import com.todoroo.astrid.data.MetadataApiDao.MetadataCriteria; import com.todoroo.astrid.service.MetadataService; /** @@ -228,7 +228,7 @@ public class OpencrxControlSet implements TaskEditControlSet { Metadata metadata = getTaskMetadata(task.getId()); if(metadata == null) - metadata = OpencrxCoreUtils.INSTANCE.newMetadata(); + metadata = OpencrxCoreUtils.INSTANCE.newMetadata(task.getId()); // Fill the dashboard-spinner and set the current dashboard long dashboardId = OpencrxCoreUtils.INSTANCE.getDefaultCreator(); @@ -344,7 +344,7 @@ public class OpencrxControlSet implements TaskEditControlSet { Metadata metadata = getTaskMetadata(task.getId()); try { if (metadata == null) { - metadata = OpencrxCoreUtils.INSTANCE.newMetadata(); + metadata = OpencrxCoreUtils.INSTANCE.newMetadata(task.getId()); } OpencrxActivityCreator dashboard = (OpencrxActivityCreator) creatorSelector.getSelectedItem();