From 6df92fce1f95982533795214861dd6417b873f76 Mon Sep 17 00:00:00 2001 From: Sam Bosley Date: Wed, 6 Mar 2013 15:05:37 -0800 Subject: [PATCH] Fixed a couple issues with non-premium users trying to create attachments --- .../com/todoroo/astrid/actfm/sync/AstridNewSyncMigrator.java | 2 ++ astrid/src/com/todoroo/astrid/activity/TaskEditFragment.java | 3 +++ 2 files changed, 5 insertions(+) diff --git a/astrid/plugin-src/com/todoroo/astrid/actfm/sync/AstridNewSyncMigrator.java b/astrid/plugin-src/com/todoroo/astrid/actfm/sync/AstridNewSyncMigrator.java index a0ff4aa5e..5f42d48d1 100644 --- a/astrid/plugin-src/com/todoroo/astrid/actfm/sync/AstridNewSyncMigrator.java +++ b/astrid/plugin-src/com/todoroo/astrid/actfm/sync/AstridNewSyncMigrator.java @@ -292,6 +292,8 @@ public class AstridNewSyncMigrator { attachment.putTransitory(SyncFlags.ACTFM_SUPPRESS_OUTSTANDING_ENTRIES, true); } + if (!ActFmPreferenceService.isPremiumUser()) + attachment.putTransitory(SyncFlags.ACTFM_SUPPRESS_OUTSTANDING_ENTRIES, true); taskAttachmentDao.createNew(attachment); } diff --git a/astrid/src/com/todoroo/astrid/activity/TaskEditFragment.java b/astrid/src/com/todoroo/astrid/activity/TaskEditFragment.java index fd4cbd07e..9246e176a 100755 --- a/astrid/src/com/todoroo/astrid/activity/TaskEditFragment.java +++ b/astrid/src/com/todoroo/astrid/activity/TaskEditFragment.java @@ -1156,6 +1156,9 @@ ViewPager.OnPageChangeListener, EditNoteActivity.UpdatesChangedListener { } private void createNewFileAttachment(String path, String fileName, String fileType) { + if (!ActFmPreferenceService.isPremiumUser()) + return; + TaskAttachment attachment = TaskAttachment.createNewAttachment(model.getUuid(), path, fileName, fileType); taskAttachmentDao.createNew(attachment); filesControlSet.refreshMetadata();