Fix lot of things haha

This commit is contained in:
h4h13 2019-02-17 22:31:35 +05:30
parent a81536ab9a
commit 4197fde140
54 changed files with 250 additions and 125 deletions

View file

@ -6,7 +6,9 @@ import code.name.monkey.retromusic.mvp.BaseView
interface HomeContract {
interface HomeView : BaseView<ArrayList<Home>>
interface HomeView : BaseView<ArrayList<Home>> {
fun showEmpty()
}
interface HomePresenter : BasePresenter<HomeView> {

View file

@ -41,11 +41,13 @@ class HomePresenter(private val view: HomeContract.HomeView) : Presenter(), Home
if (favoritePlaylist.isNotEmpty()) homes.add(Home(R.string.favorites, 0, favoritePlaylist, PLAYLISTS))
if (genres.isNotEmpty() && PreferenceUtil.getInstance().isGenreShown) homes.add(Home(R.string.genres, 0, genres, GENRES))
homes
}).subscribe { homes ->
}).subscribe({ homes ->
if (homes.isNotEmpty()) {
view.showData(homes as ArrayList<Home>)
}
}
}, {
view.showEmpty()
}, { })
}
override fun subscribe() {