From dcb1dc206a477ea3a7eff7cc235a1ebb94ca18bb Mon Sep 17 00:00:00 2001 From: Sam Bosley Date: Thu, 7 Mar 2013 18:25:07 -0800 Subject: [PATCH] Delete task attachments --- .../com/todoroo/astrid/actfm/ActFmLoginActivity.java | 9 +++++++++ .../com/todoroo/astrid/actfm/sync/ActFmInvoker.java | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/astrid/plugin-src/com/todoroo/astrid/actfm/ActFmLoginActivity.java b/astrid/plugin-src/com/todoroo/astrid/actfm/ActFmLoginActivity.java index 87b2498a6..fc3e48aff 100644 --- a/astrid/plugin-src/com/todoroo/astrid/actfm/ActFmLoginActivity.java +++ b/astrid/plugin-src/com/todoroo/astrid/actfm/ActFmLoginActivity.java @@ -80,6 +80,8 @@ import com.todoroo.astrid.dao.RemoteModelDao; import com.todoroo.astrid.dao.TagDataDao; import com.todoroo.astrid.dao.TagMetadataDao; import com.todoroo.astrid.dao.TagOutstandingDao; +import com.todoroo.astrid.dao.TaskAttachmentDao; +import com.todoroo.astrid.dao.TaskAttachmentOutstandingDao; import com.todoroo.astrid.dao.TaskDao; import com.todoroo.astrid.dao.TaskListMetadataDao; import com.todoroo.astrid.dao.TaskListMetadataOutstandingDao; @@ -135,6 +137,10 @@ public class ActFmLoginActivity extends FragmentActivity implements AuthListener @Autowired private TaskOutstandingDao taskOutstandingDao; @Autowired + private TaskAttachmentDao taskAttachmentDao; + @Autowired + private TaskAttachmentOutstandingDao taskAttachmentOutstandingDao; + @Autowired private TagDataDao tagDataDao; @Autowired private TagOutstandingDao tagOutstandingDao; @@ -653,12 +659,15 @@ public class ActFmLoginActivity extends FragmentActivity implements AuthListener taskService.deleteWhere(Task.USER_ID.neq(0)); // Delete user table userDao.deleteWhere(Criterion.all); + // Delete attachments table + taskAttachmentDao.deleteWhere(Criterion.all); // Clear all outstanding tables taskOutstandingDao.deleteWhere(Criterion.all); tagOutstandingDao.deleteWhere(Criterion.all); userActivityOutstandingDao.deleteWhere(Criterion.all); taskListMetadataOutstandingDao.deleteWhere(Criterion.all); + taskAttachmentOutstandingDao.deleteWhere(Criterion.all); // Make all tags private tagMetadataDao.deleteWhere(Criterion.all); diff --git a/astrid/plugin-src/com/todoroo/astrid/actfm/sync/ActFmInvoker.java b/astrid/plugin-src/com/todoroo/astrid/actfm/sync/ActFmInvoker.java index 826376659..81cc74ff4 100644 --- a/astrid/plugin-src/com/todoroo/astrid/actfm/sync/ActFmInvoker.java +++ b/astrid/plugin-src/com/todoroo/astrid/actfm/sync/ActFmInvoker.java @@ -38,7 +38,7 @@ import com.todoroo.astrid.utility.Constants; public class ActFmInvoker { /** NOTE: these values are development values & will not work on production */ - private static final String URL = "//10.0.2.2:3000/api/"; + private static final String URL = "//192.168.0.101:3000/api/"; private static final String APP_ID = "a4732a32859dbcd3e684331acd36432c"; private static final String APP_SECRET = "e389bfc82a0d932332f9a8bd8203735f";