From 2afb697ab869b351ad0e9eaaee30c610d8add14d Mon Sep 17 00:00:00 2001 From: Alex Baker Date: Sun, 6 Jul 2014 23:00:44 -0500 Subject: [PATCH] Remove unused TaskListMetadata columns --- .../todoroo/astrid/data/TaskListMetadata.java | 33 ------------------- .../astrid/actfm/sync/messages/NameMaps.java | 5 --- 2 files changed, 38 deletions(-) diff --git a/api/src/main/java/com/todoroo/astrid/data/TaskListMetadata.java b/api/src/main/java/com/todoroo/astrid/data/TaskListMetadata.java index bbd0d4f9e..bfea41b70 100644 --- a/api/src/main/java/com/todoroo/astrid/data/TaskListMetadata.java +++ b/api/src/main/java/com/todoroo/astrid/data/TaskListMetadata.java @@ -9,7 +9,6 @@ package com.todoroo.astrid.data; import android.content.ContentValues; import com.todoroo.andlib.data.Property; -import com.todoroo.andlib.data.Property.IntegerProperty; import com.todoroo.andlib.data.Property.LongProperty; import com.todoroo.andlib.data.Property.StringProperty; import com.todoroo.andlib.data.Table; @@ -34,14 +33,6 @@ public final class TaskListMetadata extends RemoteModel { public static final LongProperty ID = new LongProperty( TABLE, ID_PROPERTY_NAME); - /** Remote id */ - public static final StringProperty UUID = new StringProperty( - TABLE, UUID_PROPERTY_NAME); - - /** Pushed at date */ - public static final LongProperty PUSHED_AT = new LongProperty( - TABLE, PUSHED_AT_PROPERTY_NAME); - /** Tag UUID */ public static final StringProperty TAG_UUID = new StringProperty( TABLE, "tag_uuid"); @@ -54,24 +45,6 @@ public final class TaskListMetadata extends RemoteModel { public static final StringProperty TASK_IDS = new StringProperty( TABLE, "task_ids", Property.PROP_FLAG_JSON); - /** Sort setting (one of below) */ - public static final StringProperty SORT = new StringProperty( - TABLE, "sort"); - - /** Settings hash */ - public static final StringProperty SETTINGS = new StringProperty( - TABLE, "settings", Property.PROP_FLAG_JSON); - - /** Array of child tags (for folders) */ - public static final StringProperty CHILD_TAG_IDS = new StringProperty( - TABLE, "child_tags", Property.PROP_FLAG_JSON); - - /** If the folder is collapsed */ - public static final IntegerProperty IS_COLLAPSED = new IntegerProperty( - TABLE, "is_collapsed"); - - - /** List of all properties for this model */ public static final Property[] PROPERTIES = generateProperties(TaskListMetadata.class); @@ -84,15 +57,9 @@ public final class TaskListMetadata extends RemoteModel { private static final ContentValues defaultValues = new ContentValues(); static { - defaultValues.put(UUID.name, NO_UUID); - defaultValues.put(PUSHED_AT.name, 0); defaultValues.put(TAG_UUID.name, NO_UUID); defaultValues.put(FILTER.name, ""); defaultValues.put(TASK_IDS.name, "[]"); - defaultValues.put(SORT.name, ""); - defaultValues.put(SETTINGS.name, "{}"); - defaultValues.put(CHILD_TAG_IDS.name, "[]"); - defaultValues.put(IS_COLLAPSED.name, 0); } @Override diff --git a/astrid/src/main/java/com/todoroo/astrid/actfm/sync/messages/NameMaps.java b/astrid/src/main/java/com/todoroo/astrid/actfm/sync/messages/NameMaps.java index 7eb8dd16d..cc66ecf6c 100644 --- a/astrid/src/main/java/com/todoroo/astrid/actfm/sync/messages/NameMaps.java +++ b/astrid/src/main/java/com/todoroo/astrid/actfm/sync/messages/NameMaps.java @@ -174,13 +174,8 @@ public class NameMaps { TASK_LIST_METADATA_COLUMNS_LOCAL_TO_SERVER = new HashMap<>(); TASK_LIST_METADATA_PROPERTIES_EXCLUDED = new HashSet<>(); - putTaskListMetadataPropertyToServerName(TaskListMetadata.UUID, "uuid", false); putTaskListMetadataPropertyToServerName(TaskListMetadata.TAG_UUID, "tag_id", true); putTaskListMetadataPropertyToServerName(TaskListMetadata.FILTER, "filter", true); putTaskListMetadataPropertyToServerName(TaskListMetadata.TASK_IDS, "task_ids", true); - putTaskListMetadataPropertyToServerName(TaskListMetadata.SORT, "sort", false); - putTaskListMetadataPropertyToServerName(TaskListMetadata.SETTINGS, "settings", false); - putTaskListMetadataPropertyToServerName(TaskListMetadata.CHILD_TAG_IDS, "child_tag_ids", false); - putTaskListMetadataPropertyToServerName(TaskListMetadata.IS_COLLAPSED, "is_collapsed", false); } }