Don't need include_tasks in FetchHistory

pull/14/head
Sam Bosley 12 years ago
parent 9d76225086
commit 72292c3f79

@ -106,7 +106,7 @@ public class TagCommentsFragment extends CommentsFragment {
@Override
protected void loadMoreHistory(int offset, SyncMessageCallback callback) {
new FetchHistory<TagData>(tagDataDao, TagData.HISTORY_FETCH_DATE, TagData.HISTORY_HAS_MORE, NameMaps.TABLE_ID_TAGS,
tagData.getUuid(), null, 0, offset, true, callback).execute();
tagData.getUuid(), null, 0, offset, callback).execute();
}
@Override
@ -152,7 +152,7 @@ public class TagCommentsFragment extends CommentsFragment {
if (tagData != null) {
ActFmSyncThread.getInstance().enqueueMessage(new BriefMe<UserActivity>(UserActivity.class, null, tagData.getValue(TagData.USER_ACTIVITIES_PUSHED_AT), BriefMe.TAG_ID_KEY, tagData.getUuid()), done);
new FetchHistory<TagData>(tagDataDao, TagData.HISTORY_FETCH_DATE, TagData.HISTORY_HAS_MORE, NameMaps.TABLE_ID_TAGS,
tagData.getUuid(), null, tagData.getValue(TagData.HISTORY_FETCH_DATE), 0, true, done).execute();
tagData.getUuid(), null, tagData.getValue(TagData.HISTORY_FETCH_DATE), 0, done).execute();
}
}

@ -94,7 +94,7 @@ public class TaskCommentsFragment extends CommentsFragment {
@Override
protected void loadMoreHistory(int offset, SyncMessageCallback callback) {
new FetchHistory<Task>(taskDao, Task.HISTORY_FETCH_DATE, Task.HISTORY_HAS_MORE, NameMaps.TABLE_ID_TASKS,
task.getUuid(), task.getValue(Task.TITLE), 0, offset, false, callback).execute();
task.getUuid(), task.getValue(Task.TITLE), 0, offset, callback).execute();
}
@Override
@ -102,7 +102,7 @@ public class TaskCommentsFragment extends CommentsFragment {
if (task != null) {
ActFmSyncThread.getInstance().enqueueMessage(new BriefMe<UserActivity>(UserActivity.class, null, task.getValue(Task.USER_ACTIVITIES_PUSHED_AT), BriefMe.TASK_ID_KEY, task.getUuid()), done);
new FetchHistory<Task>(taskDao, Task.HISTORY_FETCH_DATE, Task.HISTORY_HAS_MORE, NameMaps.TABLE_ID_TASKS,
task.getUuid(), task.getValue(Task.TITLE), task.getValue(Task.HISTORY_FETCH_DATE), 0, false, done).execute();
task.getUuid(), task.getValue(Task.TITLE), task.getValue(Task.HISTORY_FETCH_DATE), 0, done).execute();
}
}

@ -36,7 +36,6 @@ public class FetchHistory<TYPE extends RemoteModel> {
private final String taskTitle;
private final long modifiedAfter;
private final int offset;
private final boolean includeTaskHistory;
private final SyncMessageCallback done;
@Autowired
@ -52,7 +51,7 @@ public class FetchHistory<TYPE extends RemoteModel> {
private ActFmPreferenceService actFmPreferenceService;
public FetchHistory(RemoteModelDao<TYPE> dao, LongProperty historyTimeProperty, IntegerProperty historyHasMoreProperty,
String table, String uuid, String taskTitle, long modifiedAfter, int offset, boolean includeTaskHistory, SyncMessageCallback done) {
String table, String uuid, String taskTitle, long modifiedAfter, int offset, SyncMessageCallback done) {
DependencyInjectionService.getInstance().inject(this);
this.dao = dao;
this.historyTimeProperty = historyTimeProperty;
@ -62,7 +61,6 @@ public class FetchHistory<TYPE extends RemoteModel> {
this.taskTitle = taskTitle;
this.modifiedAfter = modifiedAfter;
this.offset = offset;
this.includeTaskHistory = includeTaskHistory;
this.done = done;
}
@ -85,10 +83,6 @@ public class FetchHistory<TYPE extends RemoteModel> {
params.add(uuid);
if (includeTaskHistory) {
params.add("include_tasks"); params.add(1);
}
if (modifiedAfter > 0) {
params.add("modified_after"); params.add(modifiedAfter / 1000L);
}

@ -380,7 +380,7 @@ public class EditNoteActivity extends LinearLayout implements TimerActionListene
setUpListAdapter();
if (task.getValue(Task.HISTORY_HAS_MORE) > 0)
new FetchHistory<Task>(taskDao, Task.HISTORY_FETCH_DATE, Task.HISTORY_HAS_MORE, NameMaps.TABLE_ID_TASKS,
task.getUuid(), task.getValue(Task.TITLE), 0, historyCount, false, callback).execute();
task.getUuid(), task.getValue(Task.TITLE), 0, historyCount, callback).execute();
}
});
this.addView(loadMore);
@ -448,7 +448,7 @@ public class EditNoteActivity extends LinearLayout implements TimerActionListene
ActFmSyncThread.getInstance().enqueueMessage(new BriefMe<UserActivity>(UserActivity.class, null, task.getValue(Task.USER_ACTIVITIES_PUSHED_AT), BriefMe.TASK_ID_KEY, task.getUuid()), callback);
ActFmSyncThread.getInstance().enqueueMessage(new BriefMe<TaskAttachment>(TaskAttachment.class, null, task.getValue(Task.ATTACHMENTS_PUSHED_AT), BriefMe.TASK_ID_KEY, task.getUuid()), callback);
new FetchHistory<Task>(taskDao, Task.HISTORY_FETCH_DATE, Task.HISTORY_HAS_MORE, NameMaps.TABLE_ID_TASKS,
task.getUuid(), task.getValue(Task.TITLE), task.getValue(Task.HISTORY_FETCH_DATE), 0, false, callback).execute();
task.getUuid(), task.getValue(Task.TITLE), task.getValue(Task.HISTORY_FETCH_DATE), 0, callback).execute();
}
private void addComment() {

Loading…
Cancel
Save