ryanw-mobile / OctoMeter

🔥Kotlin Multiplatform Desktop/Android/iOS Energy Tracker app
Other
78 stars 7 forks source link

(#245) UsageScreen: Bound navigation using first tariff start date instead of move-in date #248

Closed ryanw-mobile closed 6 days ago

ryanw-mobile commented 6 days ago

It is a fact that the account move-in date does not mean the day we start to have meter readings and an effective tariff. This is the same wrong assumption the official Octopus App made and caused the error. We changed to use the first tariff on record to determine how early we allow users to navigate back to, because otherwise, even the API returns 0 meter readings, we still have no effective tariff to work out the billing.

codacy-production[bot] commented 6 days ago

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
:white_check_mark: -0.19% (target: -1.00%) :white_check_mark: 19.05%
Coverage variation details | | Coverable lines | Covered lines | Coverage | | ------------- | ------------- | ------------- | ------------- | | Common ancestor commit (d67500e0116d0f3130e31eceb723b948177b4d13) | 2124 | 1398 | 65.82% | | | Head commit (d9dbd52b0ff54b4f1b7ce9b4a08c981f67e03256) | 2130 (+6) | 1398 (+0) | 65.63% (**-0.19%**) | **Coverage variation** is the difference between the coverage for the head and common ancestor commits of the pull request branch: ` - `
Diff coverage details | | Coverable lines | Covered lines | Diff coverage | | ------------- | ------------- | ------------- | ------------- | | Pull request (#248) | 21 | 4 | **19.05%** | **Diff coverage** is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: `/ * 100%`

See your quality gate settings    Change summary preferences


:rocket: Don’t miss a bit, follow what’s new on Codacy.

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

codecov[bot] commented 6 days ago

Codecov Report

Attention: Patch coverage is 14.28571% with 18 lines in your changes missing coverage. Please review.

Project coverage is 60.77%. Comparing base (d67500e) to head (d9dbd52).

Files Patch % Lines
...om/rwmobi/kunigami/ui/viewmodels/UsageViewModel.kt 0.00% 17 Missing :warning:
...gami/domain/model/account/ElectricityMeterPoint.kt 50.00% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #248 +/- ## ========================================== - Coverage 60.97% 60.77% -0.20% ========================================== Files 103 103 Lines 2037 2042 +5 Branches 329 330 +1 ========================================== - Hits 1242 1241 -1 - Misses 676 681 +5 - Partials 119 120 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.