You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a doer, I want to see what habits I need to do today.
Rationale - Removes any unneeded information (habits that don't need to be pursued at the current day) from the user's view.
Story Points - 5
Risk Level - Medium
Details - Same list as all habits, just add a filter depending on the current day.
Copy TodaysHabitsFragment class to HabitsListFragment (or all habits fragment) class.
Make TodaysHabitsFragment extend HabitsListFragment and override method for updating the UI.
// For All Habits@OverridepublicvoidonStart() {
super.onStart();
mHabitViewModel.getAllHabits().observe(this, list -> {
// need to cast List<HabitEntity> to List<Habit>List<Habit> habits = newArrayList<>(list);
adapter.submitList(habits);
});
}
// For Today's Habits@OverridepublicvoidonStart() {
super.onStart();
mHabitViewModel.getAllHabits().observe(this, list -> {
// need to cast List<HabitEntity> to List<Habit>List<Habit> habits = newArrayList<>();
for (HabitEntityh : list) {
// method can be implemented in this fragment or in the `Habit` interfaceif (h.isTodaysHabit(today)) {
habits.add(h);
}
}
adapter.submitList(habits);
});
}
As a doer, I want to see what habits I need to do today.
Rationale - Removes any unneeded information (habits that don't need to be pursued at the current day) from the user's view.
Story Points - 5
Risk Level - Medium
Details - Same list as all habits, just add a filter depending on the current day.
TodaysHabitsFragment
class toHabitsListFragment
(or all habits fragment) class.TodaysHabitsFragment
extendHabitsListFragment
and override method for updating the UI.Blocked by #2.
To be released at halfway checkpoint.
The text was updated successfully, but these errors were encountered: