|
|
|
@ -5,6 +5,7 @@ import java.util.Set;
|
|
|
|
|
|
|
|
|
|
|
|
import com.todoroo.astrid.dao.TaskListMetadataDao;
|
|
|
|
import com.todoroo.astrid.dao.TaskListMetadataDao;
|
|
|
|
import com.todoroo.astrid.dao.TaskListMetadataOutstandingDao;
|
|
|
|
import com.todoroo.astrid.dao.TaskListMetadataOutstandingDao;
|
|
|
|
|
|
|
|
import com.todoroo.astrid.data.RemoteModel;
|
|
|
|
import com.todoroo.astrid.data.TaskListMetadata;
|
|
|
|
import com.todoroo.astrid.data.TaskListMetadata;
|
|
|
|
import com.todoroo.astrid.data.TaskListMetadataOutstanding;
|
|
|
|
import com.todoroo.astrid.data.TaskListMetadataOutstanding;
|
|
|
|
|
|
|
|
|
|
|
|
@ -23,13 +24,19 @@ public class TaskListMetadataChangesHappened extends ChangesHappened<TaskListMet
|
|
|
|
boolean foundOrderChange = false;
|
|
|
|
boolean foundOrderChange = false;
|
|
|
|
for (int i = changes.size() - 1; i >= 0; i--) {
|
|
|
|
for (int i = changes.size() - 1; i >= 0; i--) {
|
|
|
|
TaskListMetadataOutstanding oe = changes.get(i);
|
|
|
|
TaskListMetadataOutstanding oe = changes.get(i);
|
|
|
|
if (TaskListMetadata.TASK_IDS.name.equals(oe.getValue(TaskListMetadataOutstanding.COLUMN_STRING))) {
|
|
|
|
String column = oe.getValue(TaskListMetadataOutstanding.COLUMN_STRING);
|
|
|
|
|
|
|
|
if (TaskListMetadata.TASK_IDS.name.equals(column)) {
|
|
|
|
if (foundOrderChange) {
|
|
|
|
if (foundOrderChange) {
|
|
|
|
changes.remove(i);
|
|
|
|
changes.remove(i);
|
|
|
|
removedChanges.add(oe.getId());
|
|
|
|
removedChanges.add(oe.getId());
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
foundOrderChange = true;
|
|
|
|
foundOrderChange = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
} else if (TaskListMetadata.FILTER.name.equals(column) || TaskListMetadata.TAG_UUID.equals(column)) {
|
|
|
|
|
|
|
|
if (RemoteModel.isUuidEmpty(oe.getValue(TaskListMetadataOutstanding.VALUE_STRING))) {
|
|
|
|
|
|
|
|
changes.remove(i);
|
|
|
|
|
|
|
|
removedChanges.add(oe.getId());
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|