Reuse google task

pull/820/head
Alex Baker 7 years ago
parent f56cf72837
commit abf15a3635

@ -68,7 +68,7 @@ public final class GoogleTaskAdapter extends TaskAdapter {
@Override @Override
public void moved(int from, int to) { public void moved(int from, int to) {
TaskContainer task = getTask(from); TaskContainer task = getTask(from);
GoogleTask googleTask = task.googletask; GoogleTask googleTask = task.getGoogleTask();
if (to == 0) { if (to == 0) {
googleTaskDao.move(googleTask, 0, 0); googleTaskDao.move(googleTask, 0, 0);
} else if (to == getCount()) { } else if (to == getCount()) {
@ -128,7 +128,7 @@ public final class GoogleTaskAdapter extends TaskAdapter {
public void indented(int which, int delta) { public void indented(int which, int delta) {
TaskContainer task = getTask(which); TaskContainer task = getTask(which);
TaskContainer previous; TaskContainer previous;
GoogleTask current = googleTaskDao.getByTaskId(task.getId()); GoogleTask current = task.getGoogleTask();
if (delta == -1) { if (delta == -1) {
googleTaskDao.unindent(googleTaskDao.getByTaskId(task.getParent()), current); googleTaskDao.unindent(googleTaskDao.getByTaskId(task.getParent()), current);
} else { } else {

@ -187,4 +187,8 @@ public class TaskContainer {
public boolean isLastSubtask() { public boolean isLastSubtask() {
return secondarySort == siblings - 1; return secondarySort == siblings - 1;
} }
public GoogleTask getGoogleTask() {
return googletask;
}
} }

Loading…
Cancel
Save