-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add tests for event page #56
Comments
I can work on this |
Feel free to work on it |
@wangerekaharun is it ok if I move all the Firebase Remote Config code from EventsFragment into a new repository. This will make it a lot easier to test the fragment |
Yes its okay to do so. Do the same for all Remote Config code.. We were supposed to do so but you can take the task. |
Alright |
Also @wangerekaharun can I ask what the reason is for having the getter methods for the livedata in the viewmodels. Are they really necessary? |
More of separation of concerns. Having one method doing the fetch and the other one doing the get response from the livedata. This also helps in orientation changes. Assuming you only have one method for fetching and updating the livedata, it will be called every time we have orientation change meaning livedata will be updated again. In the current approach, since the fetch methods are called when needed, the livedata will still have their values even on orientation change |
If instead of using the livedata getters, we accessed the livedata directly (like this: |
Why would you want it to be so? |
I feel like the getters are not necessary. The livedata properties could just be made public and accessed directly. |
@michaelbukachi what's your take on this? |
I usually make live data public. It's just easier since it reduces the amount of code written. |
@johnGachihi you can go ahead and make the changes |
@wangerekaharun I've found that it's good practice to use |
Yes we already had agreed on this as @michaelbukachi had pointed out |
This is a sub issue for #53
The text was updated successfully, but these errors were encountered: