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 DiskUsage module #103

Open
rajramsaroop opened this issue Jun 24, 2024 · 0 comments
Open

Refactor DiskUsage module #103

rajramsaroop opened this issue Jun 24, 2024 · 0 comments

Comments

@rajramsaroop
Copy link
Contributor

To ensure contributions to this open source project one thing we must do is make sure we set some standards and best practices or follow some conventional standards and best practices. This makes it easier for outside developers to understand and makes it easier to contribute since what they're seeing is what can be expected from an Android/Kotlin project.

Today DiskUsageViewModel implements HealthMetricProvider. We should decouple this and instead have a DiskUsageHealthMetric class that implements the HealthMetricProvider interface. Or use the use case to return a Disk Usage HealthMetric.

We should also update the GetDiskUsageMetrics use case to match the format that is expected of use cases.

  • Rename the file/class to GetDiskUsageMetricsUseCase
  • Use cases should have only one public method, refactor to make anything else private
  • Rename public method to have the signature operator fun invoke(...): HealthMetric to keep things consistent among use cases
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

No branches or pull requests

1 participant