implemented dynamic tabs
This commit is contained in:
parent
0c23f313b6
commit
67ea2a40a9
39 changed files with 871 additions and 162 deletions
|
@ -42,7 +42,6 @@ class HomePresenter(private val view: HomeContract.HomeView) : Presenter(), Home
|
|||
loadTopArtists()
|
||||
loadATopAlbums()
|
||||
loadFavorite()
|
||||
if (PreferenceUtil.getInstance().isGenreShown) loadGenre()
|
||||
}
|
||||
|
||||
override fun subscribe() {
|
||||
|
@ -102,14 +101,4 @@ class HomePresenter(private val view: HomeContract.HomeView) : Presenter(), Home
|
|||
view.showEmptyView()
|
||||
})
|
||||
}
|
||||
|
||||
private fun loadGenre() {
|
||||
disposable += repository.allGenres
|
||||
.subscribe({
|
||||
if (it.isNotEmpty()) hashSet.add(Home(6, R.string.genres, 0, it, GENRES, R.drawable.ic_guitar_acoustic_white_24dp))
|
||||
view.showData(ArrayList(hashSet))
|
||||
}, {
|
||||
view.showEmptyView()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue