From e74d3de73b9ec0b199fe2d8de25f3d562ed06e06 Mon Sep 17 00:00:00 2001 From: Sam Bosley Date: Thu, 8 Dec 2011 19:31:54 -0800 Subject: [PATCH] Possible fix for unassigned bugs --- .../com/todoroo/astrid/actfm/EditPeopleControlSet.java | 2 +- .../com/todoroo/astrid/actfm/sync/ActFmSyncService.java | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/astrid/plugin-src/com/todoroo/astrid/actfm/EditPeopleControlSet.java b/astrid/plugin-src/com/todoroo/astrid/actfm/EditPeopleControlSet.java index 0f22a0661..f074a879c 100644 --- a/astrid/plugin-src/com/todoroo/astrid/actfm/EditPeopleControlSet.java +++ b/astrid/plugin-src/com/todoroo/astrid/actfm/EditPeopleControlSet.java @@ -292,7 +292,7 @@ public class EditPeopleControlSet extends PopupControlSet { HashSet emails = new HashSet(); HashMap names = new HashMap(); - if(task.getValue(Task.USER_ID) != 0) { + if(task.getValue(Task.USER_ID) > 0) { JSONObject user = new JSONObject(task.getValue(Task.USER)); sharedPeople.add(0, user); } diff --git a/astrid/plugin-src/com/todoroo/astrid/actfm/sync/ActFmSyncService.java b/astrid/plugin-src/com/todoroo/astrid/actfm/sync/ActFmSyncService.java index 49a1ad5f8..fe6618a78 100644 --- a/astrid/plugin-src/com/todoroo/astrid/actfm/sync/ActFmSyncService.java +++ b/astrid/plugin-src/com/todoroo/astrid/actfm/sync/ActFmSyncService.java @@ -941,8 +941,11 @@ public final class ActFmSyncService { long id = user.optLong("id", -2); if(id == -2) { model.setValue(idProperty, -1L); - if(userProperty != null) - model.setValue(userProperty, ""); + if(userProperty != null) { + JSONObject unassigned = new JSONObject(); + unassigned.put("id", -1L); + model.setValue(userProperty, unassigned.toString()); + } } else if (id == ActFmPreferenceService.userId()) { model.setValue(idProperty, 0L); if (userProperty != null)