feat: :sparkles: allow for collection of multiple trees per day
Modify the code to allow for multiple trees per day.
This commit also changes the display of the trees per day in the Stats -> Details view
New version of the details page (After the change
Old version of the details page (Before the change
What has changed
- Modified SQL (in DayDao.kt) statement to use
steps / goalinstead of just counting the days where thesteps >= goal - Modified other (StatsSummary.kt, StatsDetailsViewModel.kt) code locations to use
steps / goalinstead of just usingsteps >= goal - Changed the display of the daily tree goal from "just achieved" to "x trees collected" (see old vs new version of the details page)
- Removed/Refactored (now) unnecessary things in the strings.xml- Changed the StatsDetailsViewModel.kt from a simple boolean if the tree has been collected to an int which indicates how many trees were collected on that day
- Changed the StatsDetailsState.kt from a simple boolean if the tree has been collected to an int which indicates how many trees were collected on that day
closed #8
And by the way, don't hesitate to create multiple commits. It's generally a bad idea to force push them to origin.
If you want to fix something in the commit you created and not yet pushed, you can use git commit --amend (read more how to use it).
And by the way, don't hesitate to create multiple commits. It's generally a bad idea to force push them to origin. If you want to fix something in the commit you created and not yet pushed, you can use
git commit --amend(read more how to use it).
Perfect that I read that just AFTER creating that commit ._. Yeah, thanks for letting me know. I love to learn and clearly you have more experience than me! :heart: