Merge pull request #483 from schrockblock/bugfix/eschrock/new-task

add attribute to new tasks if auto allocated
This commit is contained in:
Phillip Thelen 2016-03-29 12:49:12 +02:00
commit d9e6356420

View file

@ -388,10 +388,17 @@ public class TasksFragment extends BaseMainFragment implements OnCheckedChangeLi
if (this.displayingTaskForm) {
return;
}
String allocationMode = "";
if (HabiticaApplication.User != null && HabiticaApplication.User.getPreferences() != null){
allocationMode = HabiticaApplication.User.getPreferences().getAllocationMode();
}
Bundle bundle = new Bundle();
bundle.putString("type", type);
bundle.putStringArrayList("tagsId", new ArrayList<>(this.getTagIds()));
bundle.putStringArrayList("tagsName", new ArrayList<>(this.getTagNames()));
bundle.putString(TaskFormActivity.TASK_TYPE_KEY, type);
bundle.putStringArrayList(TaskFormActivity.TAG_IDS_KEY, new ArrayList<>(this.getTagIds()));
bundle.putStringArrayList(TaskFormActivity.TAG_NAMES_KEY, new ArrayList<>(this.getTagNames()));
bundle.putString(TaskFormActivity.ALLOCATION_MODE_KEY, allocationMode);
Intent intent = new Intent(activity, TaskFormActivity.class);
intent.putExtras(bundle);