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

[choir] Rid off from any context reference in the view models #31

Open
Gelassen opened this issue Jun 30, 2023 · 1 comment
Open

[choir] Rid off from any context reference in the view models #31

Gelassen opened this issue Jun 30, 2023 · 1 comment

Comments

@Gelassen
Copy link
Owner

Gelassen commented Jun 30, 2023

User story

As a user I want to have a high quality app

Tech details

There are several places where context has been passed inside view model. It was done to speed-up prototyping and mostly used to provide reference to R.string. When it might ok for a quick prototyping, it is not good for a production app. Reference on the context inside viewmodel is a potential memory leak and should be avoided.

As a part of this ticket look at other areas of code that should be improved.

@Gelassen
Copy link
Owner Author

Reference to context has been removed. However, some ViewModels extends AndroidViewModel which by itself requires application as a constructor parameter. To use it is a safe. It might be a solution for a future similar scenarios.

Issue has left open because it would be used for the rest request for refactoring and rising up app quality.

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