From 5bc40deeafbc48dcb6baa210135013104f3c44b3 Mon Sep 17 00:00:00 2001 From: Sam Bosley Date: Thu, 7 Jun 2012 15:53:32 -0700 Subject: [PATCH] Fixed a bug in parsing shared_with, fixed a repeat control set ux issue --- .../todoroo/astrid/actfm/EditPeopleControlSet.java | 4 ++++ .../com/todoroo/astrid/repeats/RepeatControlSet.java | 12 ++++++------ .../src/com/todoroo/astrid/ui/PeopleContainer.java | 5 ----- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/astrid/plugin-src/com/todoroo/astrid/actfm/EditPeopleControlSet.java b/astrid/plugin-src/com/todoroo/astrid/actfm/EditPeopleControlSet.java index 908e08f96..5ac1aff78 100644 --- a/astrid/plugin-src/com/todoroo/astrid/actfm/EditPeopleControlSet.java +++ b/astrid/plugin-src/com/todoroo/astrid/actfm/EditPeopleControlSet.java @@ -754,6 +754,10 @@ public class EditPeopleControlSet extends PopupControlSet { } JSONObject sharedWith = sharedWithContainer.parseSharedWithAndTags(activity, false); + EditText message = (EditText) getSharedWithView().findViewById(R.id.message); + if (!TextUtils.isEmpty(message.getText())) + sharedWith.put("message", message.getText().toString()); + if(cbFacebook.isChecked()) sharedWith.put("fb", true); if(cbTwitter.isChecked()) diff --git a/astrid/plugin-src/com/todoroo/astrid/repeats/RepeatControlSet.java b/astrid/plugin-src/com/todoroo/astrid/repeats/RepeatControlSet.java index 4b714bdfd..aea9c78bc 100644 --- a/astrid/plugin-src/com/todoroo/astrid/repeats/RepeatControlSet.java +++ b/astrid/plugin-src/com/todoroo/astrid/repeats/RepeatControlSet.java @@ -182,13 +182,13 @@ public class RepeatControlSet extends PopupControlSet { @Override protected void readFromTaskOnInitialize() { Date date; - if(model.getValue(Task.DUE_DATE) == 0) - date = new Date(); - else + if(model.getValue(Task.DUE_DATE) != 0) { date = new Date(model.getValue(Task.DUE_DATE)); - int dayOfWeek = date.getDay(); - for(int i = 0; i < 7; i++) - daysOfWeek[i].setChecked(i == dayOfWeek); + + int dayOfWeek = date.getDay(); + for(int i = 0; i < 7; i++) + daysOfWeek[i].setChecked(i == dayOfWeek); + } // read recurrence rule if(recurrence.length() > 0) { diff --git a/astrid/src/com/todoroo/astrid/ui/PeopleContainer.java b/astrid/src/com/todoroo/astrid/ui/PeopleContainer.java index 19bd1a3df..3e93d0503 100644 --- a/astrid/src/com/todoroo/astrid/ui/PeopleContainer.java +++ b/astrid/src/com/todoroo/astrid/ui/PeopleContainer.java @@ -17,7 +17,6 @@ import android.view.KeyEvent; import android.view.LayoutInflater; import android.view.View; import android.view.inputmethod.EditorInfo; -import android.widget.EditText; import android.widget.ImageButton; import android.widget.LinearLayout; import android.widget.TextView; @@ -237,10 +236,6 @@ public class PeopleContainer extends LinearLayout { if(peopleList.length() > 0) sharedWith.put("p", peopleList); - EditText message = (EditText) findViewById(R.id.message); - if (message.getText().length() > 0) - sharedWith.put("message", message.getText().toString()); - return sharedWith; }