Remove autopopulate members

pull/281/head
Alex Baker 9 years ago
parent 88bc1cc69c
commit 4a4ffd7f3c

@ -32,8 +32,6 @@ public class TagSettingsActivity extends InjectingAppCompatActivity {
public static final String TOKEN_NEW_FILTER = "newFilter"; //$NON-NLS-1$
public static final String TOKEN_AUTOPOPULATE_MEMBERS = "autopopulateMembers"; //$NON-NLS-1$
public static final String TOKEN_AUTOPOPULATE_NAME = "autopopulateName"; //$NON-NLS-1$
private TagData tagData;
@ -72,11 +70,6 @@ public class TagSettingsActivity extends InjectingAppCompatActivity {
refreshSettingsPage();
String autopopulateMembers = getIntent().getStringExtra(TOKEN_AUTOPOPULATE_MEMBERS);
if (!TextUtils.isEmpty(autopopulateMembers)) {
getIntent().removeExtra(TOKEN_AUTOPOPULATE_MEMBERS);
}
String autopopulateName = getIntent().getStringExtra(TOKEN_AUTOPOPULATE_NAME);
if (!TextUtils.isEmpty(autopopulateName)) {
tagName.setText(autopopulateName);

@ -69,7 +69,6 @@ public class TaskListActivity extends AstridActivity implements OnPageChangeList
/** For indicating the new list screen should be launched at fragment setup time */
public static final String TOKEN_CREATE_NEW_LIST = "createNewList"; //$NON-NLS-1$
public static final String TOKEN_CREATE_NEW_LIST_MEMBERS = "newListMembers"; //$NON-NLS-1$
public static final String TOKEN_CREATE_NEW_LIST_NAME = "newListName"; //$NON-NLS-1$
public static final String OPEN_TASK = "openTask"; //$NON-NLS-1$
@ -263,9 +262,7 @@ public class TaskListActivity extends AstridActivity implements OnPageChangeList
private void newListFromLaunch() {
Intent thisIntent = getIntent();
Intent newTagIntent = newTagDialog();
newTagIntent.putExtra(TagSettingsActivity.TOKEN_AUTOPOPULATE_MEMBERS, thisIntent.getStringExtra(TOKEN_CREATE_NEW_LIST_MEMBERS));
newTagIntent.putExtra(TagSettingsActivity.TOKEN_AUTOPOPULATE_NAME, thisIntent.getStringExtra(TOKEN_CREATE_NEW_LIST_NAME));
thisIntent.removeExtra(TOKEN_CREATE_NEW_LIST_MEMBERS);
thisIntent.removeExtra(TOKEN_CREATE_NEW_LIST_NAME);
startActivityForResult(newTagIntent, NavigationDrawerFragment.REQUEST_NEW_LIST);
}

@ -13,11 +13,6 @@ import com.todoroo.astrid.activity.TaskListActivity;
import com.todoroo.astrid.dao.TagDataDao;
import com.todoroo.astrid.data.TagData;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.tasks.R;
import org.tasks.injection.InjectingActivity;
import org.tasks.preferences.ActivityPreferences;
@ -29,8 +24,6 @@ import javax.inject.Inject;
public class CalendarAlarmListCreator extends InjectingActivity {
private static final Logger log = LoggerFactory.getLogger(CalendarAlarmListCreator.class);
public static final String TOKEN_LIST_NAME = "listName"; //$NON-NLS-1$
@Inject TagDataDao tagDataDao;
@ -138,7 +131,6 @@ public class CalendarAlarmListCreator extends InjectingActivity {
public void onClick(View v) {
Intent intent = new Intent(CalendarAlarmListCreator.this, TaskListActivity.class);
intent.putExtra(TaskListActivity.TOKEN_CREATE_NEW_LIST_NAME, tagName);
intent.putExtra(TaskListActivity.TOKEN_CREATE_NEW_LIST_MEMBERS, buildMembersArray().toString());
intent.putExtra(TaskListActivity.TOKEN_CREATE_NEW_LIST, true);
startActivity(intent);
dismissWithAnimation();
@ -166,20 +158,6 @@ public class CalendarAlarmListCreator extends InjectingActivity {
}
}
private JSONArray buildMembersArray() {
JSONArray array = new JSONArray();
for (String email : emails) {
JSONObject member = new JSONObject();
try {
member.put("email", email); //$NON-NLS-1$
array.put(member);
} catch (JSONException e) {
log.error(e.getMessage(), e);
}
}
return array;
}
private String getDisplayName(int index) {
String name = names.get(index);
if (!TextUtils.isEmpty(name)) {

Loading…
Cancel
Save