Chapter 12.4 Errata

The book suggests the app should function (movies should be searchable) after making the changes up to chapter 12 section 4 (using the starter project for chapter 12).

But I had to add the following to SearchMovieActivity for it to work:

  private lateinit var searchedMovies: LiveData<List<Movie>>


    val movieRepository = MovieRepositoryImpl()
    searchedMovies = movieRepository.searchMovies(title)
    showLoading()
    searchedMovies.observe(this, Observer { it ->
      hideLoading()
      if (it == null) {
        showMessage()
      } else {
        adapter.setMovies(it)
      }
    })```

@yuncheng13 could you please have a look at this