Closed JichinX closed 3 months ago
before:
after changed:
If you only show the list when loadState.refresh is LoadState.NotLoading
then you have items in your database that are not actually displayed.
For good user experience, you should be able to show items even if the device is offline.
SearchRepositoriesActivity -> initAdapter:
It is effective before using
RemoteMediator
. after usingRemoteMediator
,loadState.source.refresh
is alwaysNotLoading
becauseError
orLoading
is now changed withinloadState.mediator
so, I replaceloadState.source.refresh
withloadState.refresh
and it works look good .This is my personal opinion,Thanks