Adde search genre

This commit is contained in:
h4h13 2019-12-06 22:43:09 +05:30
parent ee6af2a6d6
commit ff0fccae92
29 changed files with 460 additions and 589 deletions

View file

@ -53,9 +53,7 @@ interface SearchPresenter : Presenter<SearchView> {
override fun search(query: String?) {
launch {
when (val result = repository.search(query)) {
is Success -> withContext(Dispatchers.Main) {
view?.showData(result.data)
}
is Success -> withContext(Dispatchers.Main) { view?.showData(result.data) }
is Error -> withContext(Dispatchers.Main) { view?.showEmptyView() }
}
}