OneAdapter icon indicating copy to clipboard operation
OneAdapter copied to clipboard

Load more animation when submit empty list

Open vellrya opened this issue 4 years ago • 1 comments

Hello, in version 2.1.1 there is load more intermediate progress bar when calling oneAdapter.setItems(listOf()) or oneAdapter.clear() if adapter has items previously.

For example, I call this method in swipeRefreshLayout.setOnRefreshListener to clear previously loaded items (and clear onLoadMore with error), then I get two circle animation: one from swipeRefreshLayout, another one from OneAdapter - this looks bad. image

Probably adapter should not try to load more items, if empty list submitted?

vellrya avatar Jun 15 '21 13:06 vellrya

Hey again,

It's a side effect due to a previous bug (https://github.com/ironSource/OneAdapter/issues/41) Now, after each data submission, the paging logic is verified. When submitting an empty list the threshold actually is reached as 0 under it, but I agree that it's not that intuitive and should not happen. Will be fixed in the next version as a hotfix in the next couple of days.

Thanks for your help with identifying these issues!

idanatz avatar Jun 15 '21 18:06 idanatz