Commit 91802cf
authored
Fix inconsistent step of day interval (#46)
- In the badges a 24 hour interval is used, in the today screen a 0.00
until current time was used.
- This caused some weird inconsistencies between the step amount of
these two components
- Because of that it was unified.
This pull request includes a change to the `StatsViewModel` class in the
`lib/presentation/today/view_model/stats_view_model.dart` file. The
change updates the time interval used for fetching health statistics to
cover the entire day from start to end.
Time interval update:
*
[`lib/presentation/today/view_model/stats_view_model.dart`](diffhunk://#diff-3d33db26e691ac90dafcfa2cb8578bc15ae712031aa379f95c47e0acf4c5945cL18-R27):
Changed the time interval variables from `lastMidnight` and `now` to
`startOfDay` and `endOfDay` to ensure the entire day is covered when
fetching steps and distance data.1 file changed
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | | - | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
25 | | - | |
| 27 | + | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
| |||
0 commit comments