mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-19 04:09:03 +00:00
Merge pull request #636 from andrewlord1990/499_populate_currently_set_filters_by_default
Set the currently applied filters by default when creating a new task
This commit is contained in:
commit
55f5f95c82
1 changed files with 12 additions and 4 deletions
|
|
@ -40,6 +40,7 @@ import com.habitrpg.android.habitica.events.TaskSaveEvent;
|
|||
import com.habitrpg.android.habitica.events.commands.DeleteTaskCommand;
|
||||
import com.habitrpg.android.habitica.helpers.FirstDayOfTheWeekHelper;
|
||||
import com.habitrpg.android.habitica.helpers.RemindersManager;
|
||||
import com.habitrpg.android.habitica.helpers.TagsHelper;
|
||||
import com.habitrpg.android.habitica.helpers.TaskAlarmManager;
|
||||
import com.habitrpg.android.habitica.ui.WrapContentRecyclerViewLayoutManager;
|
||||
import com.habitrpg.android.habitica.ui.adapter.tasks.CheckListAdapter;
|
||||
|
|
@ -73,13 +74,14 @@ import java.util.Date;
|
|||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.OnClick;
|
||||
import rx.Observable;
|
||||
import rx.android.schedulers.AndroidSchedulers;
|
||||
import rx.schedulers.Schedulers;
|
||||
|
||||
|
||||
public class TaskFormActivity extends BaseActivity implements AdapterView.OnItemSelectedListener {
|
||||
public static final String TASK_ID_KEY = "taskId";
|
||||
public static final String USER_ID_KEY = "userId";
|
||||
|
|
@ -189,6 +191,10 @@ public class TaskFormActivity extends BaseActivity implements AdapterView.OnItem
|
|||
|
||||
@BindView(R.id.task_tags_checklist)
|
||||
LinearLayout tagsContainerLinearLayout;
|
||||
|
||||
@Inject
|
||||
TagsHelper tagsHelper;
|
||||
|
||||
EmojiPopup popup;
|
||||
|
||||
private String taskType;
|
||||
|
|
@ -361,8 +367,9 @@ public class TaskFormActivity extends BaseActivity implements AdapterView.OnItem
|
|||
|
||||
@Override
|
||||
public void onKeyboardClose() {
|
||||
if (popup.isShowing())
|
||||
if (popup.isShowing()) {
|
||||
popup.dismiss();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -515,6 +522,7 @@ public class TaskFormActivity extends BaseActivity implements AdapterView.OnItem
|
|||
}
|
||||
}
|
||||
});
|
||||
checkbox.setChecked(tagsHelper.isTagChecked(tag.getId()));
|
||||
tagsContainerLinearLayout.addView(row);
|
||||
tagCheckBoxList.add(checkbox);
|
||||
position++;
|
||||
|
|
@ -731,8 +739,9 @@ public class TaskFormActivity extends BaseActivity implements AdapterView.OnItem
|
|||
}
|
||||
}
|
||||
|
||||
if (task.text.isEmpty())
|
||||
if (task.text.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
task.notes = MarkdownParser.parseCompiled(taskNotes.getText());
|
||||
|
||||
|
|
@ -896,7 +905,6 @@ public class TaskFormActivity extends BaseActivity implements AdapterView.OnItem
|
|||
EditText datePickerText;
|
||||
DateFormat dateFormatter;
|
||||
|
||||
|
||||
public DateEditTextListener(EditText dateText) {
|
||||
calendar = Calendar.getInstance();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue