android / codelab-android-paging

Jetpack Paging codelab
Apache License 2.0
491 stars 260 forks source link

The Codelab code for 'SearchRepositoriesViewModel.searchRepo' is not the Same as GitHub Code #197

Closed joec58 closed 2 years ago

joec58 commented 2 years ago

In task 12 "Adding List Separators", for method SearchRepositoriesViewModel.searchRepo we are given code has undeclared variables:

val lastResult = currentSearchResult
if (queryString == currentQueryValue && lastResult != null) {
    return lastResult
 }
currentQueryValue = queryString

at the being of of the method and

currentSearchResult = newResult
return newResult

at the end.

These lines are not in the GitHub code for this exercise.

tunjid commented 2 years ago

@joec58 thanks for pointing this out! Fixing it ASAP

tunjid commented 2 years ago

Fixed.