android / architecture-components-samples

Samples for Android Architecture Components.
https://d.android.com/arch
Apache License 2.0
23.46k stars 8.28k forks source link

Bug: nextPage is 0, not null, on the last page #85

Open chenycu opened 7 years ago

chenycu commented 7 years ago

https://github.com/googlesamples/android-architecture-components/blob/master/GithubBrowserSample/app/src/main/java/com/android/example/github/repository/FetchNextSearchPageTask.java#L58 There is a bug here, when loading to the last page, its next page is 0 instead of null, so I add if(nextPage == null || nextPage == 0){} just fine.

JoseAlcerreca commented 7 years ago

Want to send a PR? Also, it's missing a space :)