ground-android icon indicating copy to clipboard operation
ground-android copied to clipboard

Show Sites based on visibility

Open anandwana001 opened this issue 7 months ago • 2 comments

Fixes #3068

@shobhitagarwal1612 PTAL?

anandwana001 avatar May 22 '25 06:05 anandwana001

Codecov Report

:x: Patch coverage is 90.00000% with 3 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 68.77%. Comparing base (0424f53) to head (11452ea). :warning: Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
.../persistence/remote/firebase/FirestoreDataStore.kt 0.00% 1 Missing :warning:
...sistence/remote/firebase/schema/SurveyConverter.kt 88.88% 0 Missing and 1 partial :warning:
...android/repository/LocationOfInterestRepository.kt 94.11% 0 Missing and 1 partial :warning:
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3143      +/-   ##
============================================
+ Coverage     68.66%   68.77%   +0.10%     
- Complexity     1396     1398       +2     
============================================
  Files           290      290              
  Lines          7392     7413      +21     
  Branches        761      763       +2     
============================================
+ Hits           5076     5098      +22     
+ Misses         1891     1889       -2     
- Partials        425      426       +1     
Files with missing lines Coverage Δ
...ava/org/groundplatform/android/common/Constants.kt 100.00% <ø> (ø)
...in/java/org/groundplatform/android/model/Survey.kt 100.00% <100.00%> (ø)
...d/persistence/local/room/converter/ConverterExt.kt 83.33% <100.00%> (+0.05%) :arrow_up:
...roid/persistence/local/room/entity/SurveyEntity.kt 100.00% <100.00%> (ø)
.../persistence/remote/firebase/FirestoreDataStore.kt 0.00% <0.00%> (ø)
...sistence/remote/firebase/schema/SurveyConverter.kt 77.41% <88.88%> (+3.50%) :arrow_up:
...android/repository/LocationOfInterestRepository.kt 90.76% <94.11%> (+6.84%) :arrow_up:
:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar May 26 '25 06:05 codecov[bot]

I gave it another thought and it seems that this variable is only set when fetching the survey object from remote. However, given that the Survey object is used in multiple places, it might be worth either saving it to local db for consistency or creating another object which holds remote-only object for 'Survey'.

Under the current design, the local db is the source of truth for the ViewModel layer, so allSurvey metadata needs to be persisted there. We already have local- and remote- only representations of the survey - SurveyEntity for local db, and SurveyDocument for remote. Survey is domain object which is agnostic of how/where it's persisted.

gino-m avatar Jun 09 '25 08:06 gino-m