You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe. TransactionViewModel is extending AndroidViewModel which takes in application context and requires a viewmodelFactory to be initialized. In the viewmodel, I observed that only UiModeDataStore is using the application context which can be directly injected by Hilt
Describe the solution you'd like
Instead of using the AndroidViewModel, we can extend to ViewModel and Inject the UiModeDataStore directly through constructor. This will also eliminate the use of the viewmodelFactory
Describe alternatives you've considered
I've refactored the code and the behaviour is as expected. I can raise a PR if this change is approved.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
TransactionViewModel
is extending AndroidViewModel which takes in application context and requires a viewmodelFactory to be initialized. In the viewmodel, I observed that only UiModeDataStore is using the application context which can be directly injected by HiltDescribe the solution you'd like
Instead of using the AndroidViewModel, we can extend to ViewModel and Inject the UiModeDataStore directly through constructor. This will also eliminate the use of the viewmodelFactory
Describe alternatives you've considered
I've refactored the code and the behaviour is as expected. I can raise a PR if this change is approved.
The text was updated successfully, but these errors were encountered: