Closed michaelbukachi closed 4 years ago
Is it ok to modify the recyclerView adapters to use listAdapter and diffCallback? And to introduce databinding in the adapters?
Hmm. What advantages does use of ListAdapter
have over using a regular Adapter
. Also, as much as we encouraging use of databinding, we are not enforcing it. What matters is the code is readable and testable. @wangerekaharun what do you think?
Main reason was to avoid calling notifyOnDatasetChanged upon feeding new data to the recyclerviews. I have had a discussion with @wangerekaharun to avoid huge breaking changes.
Showing CFP card for a given duration.
When should the card be hidden and shown?
Also, the promos? Is it a single promotion at a time or several in sort of a carousel?
For this PR i think its better you work on the viewmodel and tests part. Later on when we intergrate the API we can further see what areas we can address. The promos will be coming from the back end and its a single one not a list. So for a particular time, we can only have one promo running. If more, they go to the feed section.
Ok
This ViewModel should handle all the logic for the home page. Use of
livedata
+data binding
should be used to make binding to the UI easier. The logic in this ViewModel includes: