Status Update
Comments
tr...@google.com <tr...@google.com>
al...@google.com <al...@google.com> #2
With paging2 and the PagedListAdapter, I was simply checking if the list was empty before sending it to the adapter so I wasn't handle it with the adapter (which is probably wrong).
I tried to migrate to paging3 but I couldn't because I don't know how to check if the list is empty, as the PagingData that we send to the new adapter doesn't expose the list or an isEmpty method.
tr...@google.com <tr...@google.com> #3
Thanks for this, this is something we are definitely interested in! As a workaround, you can check adapter.itemCount
.
al...@google.com <al...@google.com> #4
We have a sample snippet showing how to use adapter.itemCount
in this way, but forgot to link it in KDocs (whoops):
Will fix.
al...@google.com <al...@google.com>
ap...@google.com <ap...@google.com> #5
To be clear, adapter.itemCount
will only work if placeholdersEnabled
is false
.
We held off on this change because we wanted to take some time to properly explore what it would look like to provide a public API to view the PagingState or the internal PageEvent stream, but it's clear there's immediate need for this.
In the meantime, here's an idea for a CL which adds a Boolean
to dataRefreshFlow
, which we could merge for alpha02:
Description
By comparison, the kotlin UseExperimental annotation takes a vararg markerClass argument which allows for multiple experimental APIs in the same scope.