RxJava-Android-Samples icon indicating copy to clipboard operation
RxJava-Android-Samples copied to clipboard

fix: Forbid the addition of 0 to 9 items

Open amuyu opened this issue 6 years ago • 0 comments

If you turn the screen off during pagination and turn it on for a while, the item is added from 0 to 9. Like this,

Item 0 Item 1 Item 3 Item 4 Item 5 Item 6 Item 7 Item 8 Item 9 Item 0 Item 1 Item 2 Item 3 Item 4 Item 5 Item 6 Item 7 Item 8 Item 9 Item 20 Item 21 Item 22 Item 23 Item 24 Item 25 Item 26 Item 27 Item 28 Item 29

The reason is that _paginator.onNext(0) is called in onStart when the screen is on. If emit the number of the list in onStart, it display normally.

amuyu avatar Oct 19 '17 08:10 amuyu