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 out single use logic from SurveyRepository to existing use cases #3017

Merged
merged 9 commits into from
Jan 20, 2025

Conversation

shobhitagarwal1612
Copy link
Member

Towards #3014

  • Moves business logic for fetching and saving survey to SyncSurveyUseCase
  • Moves business logic for subscribing to remote updates to MakeSurveyAvailableOfflineUseCase

Copy link

codecov bot commented Jan 19, 2025

Codecov Report

Attention: Patch coverage is 92.30769% with 2 lines in your changes missing coverage. Please review.

Project coverage is 63.45%. Comparing base (040cbb5) to head (0e73868).

Files with missing lines Patch % Lines
...in/java/com/google/android/ground/MainViewModel.kt 0.00% 1 Missing ⚠️
...ain/usecases/survey/ReactivateLastSurveyUseCase.kt 90.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3017      +/-   ##
============================================
+ Coverage     63.42%   63.45%   +0.02%     
- Complexity     1259     1261       +2     
============================================
  Files           269      269              
  Lines          6551     6553       +2     
  Branches        928      926       -2     
============================================
+ Hits           4155     4158       +3     
+ Misses         1794     1793       -1     
  Partials        602      602              
Files with missing lines Coverage Δ
...nd/domain/usecases/survey/ActivateSurveyUseCase.kt 100.00% <100.00%> (ø)
...ecases/survey/MakeSurveyAvailableOfflineUseCase.kt 100.00% <100.00%> (ø)
...ground/domain/usecases/survey/SyncSurveyUseCase.kt 100.00% <100.00%> (ø)
...ogle/android/ground/repository/SurveyRepository.kt 69.23% <ø> (-6.33%) ⬇️
...in/java/com/google/android/ground/MainViewModel.kt 78.72% <0.00%> (+3.21%) ⬆️
...ain/usecases/survey/ReactivateLastSurveyUseCase.kt 92.85% <90.00%> (+12.85%) ⬆️

... and 1 file with indirect coverage changes

@shobhitagarwal1612 shobhitagarwal1612 merged commit a0975c3 into master Jan 20, 2025
1 check passed
@shobhitagarwal1612 shobhitagarwal1612 deleted the ashobhit/3014/move-to-sync-survey-usecase branch January 20, 2025 06:54
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