Create the sync action helper in task list when activity is created so it is never null

pull/14/head
Sam Bosley 14 years ago
parent cbe27ce4a0
commit 3a209843aa

@ -265,6 +265,7 @@ public class TaskListFragment extends ListFragment implements OnScrollListener,
// We have a menu item to show in action bar. // We have a menu item to show in action bar.
setHasOptionsMenu(true); setHasOptionsMenu(true);
syncActionHelper = new SyncActionHelper(getActivity(), this);
setUpUiComponents(); setUpUiComponents();
onNewIntent(getActivity().getIntent()); onNewIntent(getActivity().getIntent());
setupQuickAddBar(); setupQuickAddBar();
@ -293,6 +294,7 @@ public class TaskListFragment extends ListFragment implements OnScrollListener,
Thread.currentThread().setPriority(Thread.MAX_PRIORITY); Thread.currentThread().setPriority(Thread.MAX_PRIORITY);
} }
}); });
} }
/** /**
@ -833,7 +835,6 @@ public class TaskListFragment extends ListFragment implements OnScrollListener,
setListAdapter(taskAdapter); setListAdapter(taskAdapter);
getListView().setOnScrollListener(this); getListView().setOnScrollListener(this);
registerForContextMenu(getListView()); registerForContextMenu(getListView());
syncActionHelper = new SyncActionHelper(getActivity(), this);
loadTaskListContent(true); loadTaskListContent(true);
} }

Loading…
Cancel
Save