Search in sources :

Example 6 with FavourateSongEvent

use of io.hefuyi.listener.event.FavourateSongEvent in project ListenerMusicPlayer by hefuyicoder.

the class ArtistFragment method subscribeFavourateSongEvent.

private void subscribeFavourateSongEvent() {
    Subscription subscription = RxBus.getInstance().toObservable(FavourateSongEvent.class).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(new Action1<FavourateSongEvent>() {

        @Override
        public void call(FavourateSongEvent event) {
            mPresenter.loadArtists(action);
        }
    }, new Action1<Throwable>() {

        @Override
        public void call(Throwable throwable) {
        }
    });
    RxBus.getInstance().addSubscription(this, subscription);
}
Also used : FavourateSongEvent(io.hefuyi.listener.event.FavourateSongEvent) Subscription(rx.Subscription)

Aggregations

FavourateSongEvent (io.hefuyi.listener.event.FavourateSongEvent)6 Subscription (rx.Subscription)4 Dialog (android.app.Dialog)1 AppCompatActivity (android.support.v7.app.AppCompatActivity)1 View (android.view.View)1 OnClick (butterknife.OnClick)1 MaterialDialog (com.afollestad.materialdialogs.MaterialDialog)1 PlaylistUpdateEvent (io.hefuyi.listener.event.PlaylistUpdateEvent)1 Playlist (io.hefuyi.listener.mvp.model.Playlist)1 CreatePlaylistDialog (io.hefuyi.listener.ui.dialogs.CreatePlaylistDialog)1 List (java.util.List)1