codelab-android-paging icon indicating copy to clipboard operation
codelab-android-paging copied to clipboard

Duplicates when the items in second page is less and results not updated

Open aiswarya-sk opened this issue 4 years ago • 2 comments

When Page size is set to 20, visible_threshold is 5 and search with keyword "Wasabee" the total items received is 21, but on scroll, there are duplicate items summing up to 41.

The list shows duplicates with totalItemCount as 41 (Figure 1). duplicate

Sometimes, when the results are returned, the UI still shows No results. (Figure 2). Fig2_no_results

response RepoSearchResponse(total=43, items=[Repo(id=28428729, name=awesome-android-ui, fullName=wasabeef/awesome-android-ui, description=A curated list of awesome Android UI/UX libraries, url=https://github.com/wasabeef/awesome-android-ui, stars=40710, forks=9965, language=null), Repo(id=28340997, name=recyclerview-animators, fullName=wasabeef/recyclerview-animators, description=An Android Animation library which easily add itemanimator to RecyclerView items., url=https://github.com/wasabeef/recyclerview-animators, stars=10689, forks=1940, language=Kotlin), Repo(id=29012058, name=glide-transformations, fullName=wasabeef/glide-transformations, description=An Android transformation library providing a variety of image transformations for Glide., url=https://github.com/wasabeef/glide-transformations, stars=9349, forks=1362, language=Java), Repo(id=33134213, name=richeditor-android, fullName=wasabeef/richeditor-android, description=RichEditor for Android is a beautiful Rich Text WYSIWYG Editor for Android., url=https://github.com/wasabeef/richeditor-android, stars=5525, forks=1098, language=Java), Repo(id=25873041, name=awesome-android-libraries, fullName=wasabeef/awesome-android-libraries, description=This is an alphabetical list of libraries for Android development, the majority being actively maintained., url=https://github.com/wasabeef/awesome-android-libraries, stars=5275, forks=1244, language=null), Repo(id=39571075, name=Blurry, fullName=wasabeef/Blurry, description=Blurry is an easy blur library for Android, url=https://github.com/wasabeef/Blurry, stars=4918, forks=572, language=Java), Repo(id=29178568, name=picasso-transformations, fullName=wasabeef/picasso-transformations, description=An Android transformation library providing a variety of image transformations for Picasso, url=https://github.com/wasabeef/picasso-transformations, stars=1684, forks=247, language=Java), Repo(id=42095567, name=Takt, fullName=wasabeef/Takt, description=Takt is Android library for measuring the FPS using Choreographer., url=https://github.com/wasabeef/Takt, stars=1072, forks=105, language=Java), Repo(id=34001093, name=fresco-processors, fullName=wasabeef/fresco-processors, description=An Android image processor library providing a variety of image transformations for Fresco., url=https://github.com/wasabeef/fresco-processors, stars=887, forks=132, language=Java), Repo(id=284228388, name=flutter-architecture-blueprints, fullName=wasabeef/flutter-architecture-blueprints, description=Flutter Architecture Blueprints is a project that introduces MVVM architecture and project structure approaches to developing Flutter apps., url=https://github.com/wasabeef/flutter-architecture-blueprints, stars=836, forks=80, language=Dart), Repo(id=41047753, name=awesome-android-tools, fullName=wasabeef/awesome-android-tools, description=A curated list of awesome Android Tools., url=https://github.com/wasabeef/awesome-android-tools, stars=306, forks=66, language=null), Repo(id=217567762, name=transformers, fullName=wasabeef/transformers, description=An Android transformation library providing a variety of image transformations for Coil, Glide, Picasso, and Fresco., url=https://github.com/wasabeef/transformers, stars=180, forks=8, language=Kotlin), Repo(id=125887194, name=kotlin-mvvm, fullName=wasabeef/kotlin-mvvm, description=Sample for MVVM using Kotlin, url=https://github.com/wasabeef/kotlin-mvvm, stars=173, forks=49, language=Kotlin), Repo(id=220750357, name=droid, fullName=wasabeef/droid, description=A command-line tool for checking Android OS version history written by Rust., url=https://github.com/wasabeef/droid, stars=116, forks=5, language=Rust), Repo(id=298064545, name=composable-images, fullName=wasabeef/composable-images, description=The Composable Images is a library providing Jetpack Compose wrapper for Glide, Picasso, and Coil., url=https://github.com/wasabeef/composable-images, stars=107, forks=2, language=Kotlin), Repo(id=52721057, name=android-RoundedTextureView, fullName=wasabeef/android-Roun

aiswarya-sk avatar Jun 16 '21 04:06 aiswarya-sk

@aiswarya-sk please cold you tell me where you set visible_threshold to reproduce this issue?

tunjid avatar Jun 30 '21 17:06 tunjid

I was able to reproduce the no result found issue. It happens when NETWORK_PAGE_SIZE is set to 20. It looks like that all repositories on first page filtered by repoByName. Because wasabeef only in fullName field.

matsun000 avatar Feb 02 '22 13:02 matsun000