Simple app that lists people which are fetched from mock network called PeopleDataSource
.
There have been some changes on provided files. These changes are;
Person.kt
was renamed asPersonResponse.kt
to make it obvious that this class belongs todata
layer.DataSource
was renamed asPeopleDataSource
to make it more specific that it belongs topeople
.FetchError
used to haveString
. Now it hasThrowable
, to be able to make error messages more user friendly/localized.
To install the app, .apk
can be found in ScorpCaseStudy/app-debug.apk
. It is an unsigned apk (signed with debug key).
There is only one test class called GetPeopleUseCaseTest
which tests GetPeopleUseCaseImpl
class.
When PeopleFragment
is launched, it fetches item list once, then checks if listed items are longer than the RecyclerView
. If not, it fetches another item list. This causes an UI issue.
Solution would be to calculate ViewHolder
and RecyclerView
heights and find min item count should be fetched before updating the UI.