Added empty state
This commit is contained in:
commit
b66184787d
18 changed files with 305 additions and 135 deletions
|
@ -50,10 +50,8 @@ interface AlbumsPresenter : Presenter<AlbumsView> {
|
|||
override fun loadAlbums() {
|
||||
launch {
|
||||
when (val result = repository.allAlbums()) {
|
||||
is Result.Success -> {
|
||||
withContext(Dispatchers.Main) {
|
||||
view?.albums(result.data)
|
||||
}
|
||||
is Result.Success -> withContext(Dispatchers.Main) {
|
||||
view?.albums(result.data)
|
||||
}
|
||||
is Result.Error -> withContext(Dispatchers.Main) { view?.showEmptyView() }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue