|
|
@ -60,9 +60,13 @@ import com.todoroo.astrid.data.User;
|
|
|
|
import com.todoroo.astrid.helper.AsyncImageView;
|
|
|
|
import com.todoroo.astrid.helper.AsyncImageView;
|
|
|
|
import com.todoroo.astrid.service.AstridDependencyInjector;
|
|
|
|
import com.todoroo.astrid.service.AstridDependencyInjector;
|
|
|
|
import com.todoroo.astrid.service.MetadataService;
|
|
|
|
import com.todoroo.astrid.service.MetadataService;
|
|
|
|
|
|
|
|
import com.todoroo.astrid.service.StatisticsConstants;
|
|
|
|
|
|
|
|
import com.todoroo.astrid.service.StatisticsService;
|
|
|
|
import com.todoroo.astrid.service.TagDataService;
|
|
|
|
import com.todoroo.astrid.service.TagDataService;
|
|
|
|
import com.todoroo.astrid.service.TaskService;
|
|
|
|
import com.todoroo.astrid.service.TaskService;
|
|
|
|
import com.todoroo.astrid.service.ThemeService;
|
|
|
|
import com.todoroo.astrid.service.ThemeService;
|
|
|
|
|
|
|
|
import com.todoroo.astrid.service.abtesting.ABChooser;
|
|
|
|
|
|
|
|
import com.todoroo.astrid.service.abtesting.ABOptions;
|
|
|
|
import com.todoroo.astrid.tags.TagService;
|
|
|
|
import com.todoroo.astrid.tags.TagService;
|
|
|
|
import com.todoroo.astrid.ui.PeopleContainer;
|
|
|
|
import com.todoroo.astrid.ui.PeopleContainer;
|
|
|
|
import com.todoroo.astrid.ui.PeopleContainer.OnAddNewPersonListener;
|
|
|
|
import com.todoroo.astrid.ui.PeopleContainer.OnAddNewPersonListener;
|
|
|
@ -93,6 +97,8 @@ public class EditPeopleControlSet extends PopupControlSet {
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired TagDataService tagDataService;
|
|
|
|
@Autowired TagDataService tagDataService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired ABChooser abChooser;
|
|
|
|
|
|
|
|
|
|
|
|
private final Fragment fragment;
|
|
|
|
private final Fragment fragment;
|
|
|
|
|
|
|
|
|
|
|
|
private final PeopleContainer sharedWithContainer;
|
|
|
|
private final PeopleContainer sharedWithContainer;
|
|
|
@ -388,12 +394,18 @@ public class EditPeopleControlSet extends PopupControlSet {
|
|
|
|
new JSONObject().put("default_picture", R.drawable.icn_friends)
|
|
|
|
new JSONObject().put("default_picture", R.drawable.icn_friends)
|
|
|
|
.put(CONTACT_CHOOSER_USER, true));
|
|
|
|
.put(CONTACT_CHOOSER_USER, true));
|
|
|
|
int contactsIndex = addUnassigned ? 2 : 1;
|
|
|
|
int contactsIndex = addUnassigned ? 2 : 1;
|
|
|
|
coreUsers.add(contactsIndex, contactPickerUser);
|
|
|
|
boolean addedContacts = true;
|
|
|
|
|
|
|
|
if (abChooser.getChoiceForOption(ABOptions.AB_OPTION_CONTACTS_PICKER_ENABLED) == 0)
|
|
|
|
|
|
|
|
coreUsers.add(contactsIndex, contactPickerUser);
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
addedContacts = false;
|
|
|
|
|
|
|
|
|
|
|
|
for (AssignedChangedListener l : listeners) {
|
|
|
|
for (AssignedChangedListener l : listeners) {
|
|
|
|
if (l.shouldShowTaskRabbit()) {
|
|
|
|
if (l.shouldShowTaskRabbit()) {
|
|
|
|
taskRabbitUser = new AssignedToUser(activity.getString(R.string.actfm_EPA_task_rabbit), new JSONObject().put("default_picture", R.drawable.task_rabbit_image));
|
|
|
|
taskRabbitUser = new AssignedToUser(activity.getString(R.string.actfm_EPA_task_rabbit), new JSONObject().put("default_picture", R.drawable.task_rabbit_image));
|
|
|
|
int taskRabbitIndex = addUnassigned ? 3 : 2;
|
|
|
|
int taskRabbitIndex = addUnassigned ? 3 : 2;
|
|
|
|
|
|
|
|
if (!addedContacts)
|
|
|
|
|
|
|
|
taskRabbitIndex--;
|
|
|
|
coreUsers.add(taskRabbitIndex, taskRabbitUser);
|
|
|
|
coreUsers.add(taskRabbitIndex, taskRabbitUser);
|
|
|
|
if(l.didPostToTaskRabbit()){
|
|
|
|
if(l.didPostToTaskRabbit()){
|
|
|
|
assignedIndex = taskRabbitIndex;
|
|
|
|
assignedIndex = taskRabbitIndex;
|
|
|
@ -782,6 +794,11 @@ public class EditPeopleControlSet extends PopupControlSet {
|
|
|
|
|
|
|
|
|
|
|
|
task.putTransitory(TaskService.TRANS_ASSIGNED, true);
|
|
|
|
task.putTransitory(TaskService.TRANS_ASSIGNED, true);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (assignedView == assignedCustom)
|
|
|
|
|
|
|
|
StatisticsService.reportEvent(StatisticsConstants.TASK_ASSIGNED_EMAIL);
|
|
|
|
|
|
|
|
else if (task.getValue(Task.USER_ID) != Task.USER_ID_SELF)
|
|
|
|
|
|
|
|
StatisticsService.reportEvent(StatisticsConstants.TASK_ASSIGNED_PICKER);
|
|
|
|
|
|
|
|
|
|
|
|
if(sharedToast != null)
|
|
|
|
if(sharedToast != null)
|
|
|
|
toast = (toast != null) ? toast + "\n" + sharedToast : sharedToast + "\n";
|
|
|
|
toast = (toast != null) ? toast + "\n" + sharedToast : sharedToast + "\n";
|
|
|
|
showSaveToast(toast);
|
|
|
|
showSaveToast(toast);
|
|
|
|