implemented dynamic tabs

This commit is contained in:
h4h13 2019-07-22 20:56:37 +05:30
parent 0c23f313b6
commit 67ea2a40a9
39 changed files with 871 additions and 162 deletions

View file

@ -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()
})
}
}