Fixed a bug in parsing shared_with, fixed a repeat control set ux issue

pull/14/head
Sam Bosley 13 years ago
parent 39bde42eb1
commit 5bc40deeaf

@ -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())

@ -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) {

@ -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;
}

Loading…
Cancel
Save