Skip to content

Commit

Permalink
Make tab changes no longer cancel library loading
Browse files Browse the repository at this point in the history
  • Loading branch information
mattttvaughn committed Apr 23, 2023
1 parent b4dc495 commit 3477be6
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,9 @@ class HomeViewModel(
if (query.isEmpty()) {
_searchResults.postValue(emptyList())
} else {
bookRepository.search(query).observeOnce(
Observer {
_searchResults.postValue(it)
}
)
bookRepository.search(query).observeOnce {
_searchResults.postValue(it)
}
}
}

Expand Down

0 comments on commit 3477be6

Please sign in to comment.