ryanw-mobile / OctoMeter

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

(#211) Fix Usage Screen retry when returning from network error #226

Closed ryanw-mobile closed 2 weeks ago

ryanw-mobile commented 2 weeks ago

In UsageViewModel, we forgot to specify requestedScreenType = UsageScreenType.Chart, when we want to show the chart. Since this was a default value we were not aware of it until ErrorScreen alters this value.

A quick fix to add back this value.

Also refactored a bit the ViewModel and other classes.

codacy-production[bot] commented 2 weeks ago

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
:white_check_mark: -0.03% (target: -1.00%) :white_check_mark: 25.49%
Coverage variation details | | Coverable lines | Covered lines | Coverage | | ------------- | ------------- | ------------- | ------------- | | Common ancestor commit (3420024f7805abc3d7162d4fa2ef3172c61b1c84) | 1825 | 974 | 53.37% | | | Head commit (cb512b5c136e58fe7f226a231f28c3f5aea791de) | 1826 (+1) | 974 (+0) | 53.34% (**-0.03%**) | **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 (#226) | 51 | 13 | **25.49%** | **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