Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor DataCollectionViewModel #2996

Merged

Conversation

shobhitagarwal1612
Copy link
Member

@shobhitagarwal1612 shobhitagarwal1612 commented Jan 10, 2025

This PR is a pure refactor which is split from #2986 so that main logic change can be separated from refactors.

Things done:

  • Instead of using currentTaskId.value as default task id in all method, pass the id from the callers
  • Prevent re-creating task sequence for each value when storing values to local db.
  • Cleanup unused code.

@anandwana001 PTAL?

@auto-assign auto-assign bot requested a review from scolsen January 10, 2025 12:12
@shobhitagarwal1612 shobhitagarwal1612 requested review from anandwana001 and removed request for scolsen January 10, 2025 12:12
Copy link

codecov bot commented Jan 10, 2025

Codecov Report

Attention: Patch coverage is 59.37500% with 13 lines in your changes missing coverage. Please review.

Project coverage is 63.41%. Comparing base (5d2e5ec) to head (dc09650).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...round/ui/datacollection/DataCollectionViewModel.kt 59.37% 9 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master    #2996   +/-   ##
=========================================
  Coverage     63.41%   63.41%           
+ Complexity     1244     1241    -3     
=========================================
  Files           267      267           
  Lines          6513     6505    -8     
  Branches        913      912    -1     
=========================================
- Hits           4130     4125    -5     
+ Misses         1796     1792    -4     
- Partials        587      588    +1     
Files with missing lines Coverage Δ
...round/ui/datacollection/DataCollectionViewModel.kt 80.52% <59.37%> (+1.23%) ⬆️

... and 1 file with indirect coverage changes

@shobhitagarwal1612
Copy link
Member Author

@anandwana001 PTAL?

@shobhitagarwal1612 shobhitagarwal1612 merged commit 7b979d5 into master Jan 14, 2025
5 checks passed
@shobhitagarwal1612 shobhitagarwal1612 deleted the ashobhit/2993/refactor-datacollectionViewModel branch January 14, 2025 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants