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

[Code health] Consider refactoring SurveyRepository #3014

Open
shobhitagarwal1612 opened this issue Jan 19, 2025 · 0 comments
Open

[Code health] Consider refactoring SurveyRepository #3014

shobhitagarwal1612 opened this issue Jan 19, 2025 · 0 comments
Assignees
Labels
type: code health Improvements to readability or robustness of codebase

Comments

@shobhitagarwal1612
Copy link
Member

SurveyRepository does a lot of things,

  • Maintaining state of currently active survey
  • Fetching surveys from remote data store
  • Fetching surveys from local data store
  • Using local value store to get/set active survey id
  • Merging local and remote surveys and also adding offline status.

It is currently used by multiple domain use cases and view models.
Ideally, we should move the remaining responsibilities from SurveyRepository to new use cases. In addition to that, we can split local/remote survey handling into separate repositories.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: code health Improvements to readability or robustness of codebase
Projects
Status: No status
Development

No branches or pull requests

1 participant