diff --git a/astrid/src/main/java/com/todoroo/astrid/gtasks/GtasksListFragment.java b/astrid/src/main/java/com/todoroo/astrid/gtasks/GtasksListFragment.java index 2972f908c..6a9ec34d0 100644 --- a/astrid/src/main/java/com/todoroo/astrid/gtasks/GtasksListFragment.java +++ b/astrid/src/main/java/com/todoroo/astrid/gtasks/GtasksListFragment.java @@ -22,6 +22,7 @@ import com.todoroo.astrid.dao.StoreObjectDao; import com.todoroo.astrid.data.StoreObject; import com.todoroo.astrid.data.Task; import com.todoroo.astrid.helper.ProgressBarSyncResultCallback; +import com.todoroo.astrid.service.MetadataService; import com.todoroo.astrid.service.SyncV2Service; import com.todoroo.astrid.service.TaskService; import com.todoroo.astrid.subtasks.OrderedListFragmentHelperInterface; @@ -37,6 +38,7 @@ public class GtasksListFragment extends SubtasksListFragment { public static final String TOKEN_STORE_ID = "storeId"; //$NON-NLS-1$ @Inject TaskService taskService; + @Inject MetadataService metadataService; @Inject StoreObjectDao storeObjectDao; @Inject GtasksTaskListUpdater gtasksTaskListUpdater; @Inject GtasksMetadataService gtasksMetadataService; @@ -55,7 +57,7 @@ public class GtasksListFragment extends SubtasksListFragment { @Override protected OrderedListFragmentHelperInterface createFragmentHelper() { - return new OrderedMetadataListFragmentHelper<>(this, gtasksTaskListUpdater); + return new OrderedMetadataListFragmentHelper<>(taskService, metadataService, this, gtasksTaskListUpdater); } @Override diff --git a/astrid/src/main/java/com/todoroo/astrid/subtasks/OrderedMetadataListFragmentHelper.java b/astrid/src/main/java/com/todoroo/astrid/subtasks/OrderedMetadataListFragmentHelper.java index 1660850a1..87d1265b3 100644 --- a/astrid/src/main/java/com/todoroo/astrid/subtasks/OrderedMetadataListFragmentHelper.java +++ b/astrid/src/main/java/com/todoroo/astrid/subtasks/OrderedMetadataListFragmentHelper.java @@ -19,8 +19,6 @@ import com.commonsware.cwac.tlv.TouchListView.GrabberClickListener; import com.commonsware.cwac.tlv.TouchListView.SwipeListener; import com.todoroo.andlib.data.Property; import com.todoroo.andlib.data.TodorooCursor; -import com.todoroo.andlib.service.Autowired; -import com.todoroo.andlib.service.DependencyInjectionService; import com.todoroo.andlib.utility.DateUtilities; import com.todoroo.andlib.utility.DialogUtilities; import com.todoroo.andlib.utility.Preferences; @@ -53,15 +51,16 @@ public class OrderedMetadataListFragmentHelper implements OrderedListFragm private final OrderedMetadataListUpdater updater; private final TaskListFragment fragment; - @Autowired TaskService taskService; - @Autowired MetadataService metadataService; + private final TaskService taskService; + private final MetadataService metadataService; private DraggableTaskAdapter taskAdapter; private LIST list; - public OrderedMetadataListFragmentHelper(TaskListFragment fragment, OrderedMetadataListUpdater updater) { - DependencyInjectionService.getInstance().inject(this); + public OrderedMetadataListFragmentHelper(TaskService taskService, MetadataService metadataService, TaskListFragment fragment, OrderedMetadataListUpdater updater) { + this.taskService = taskService; + this.metadataService = metadataService; this.fragment = fragment; this.updater = updater; }