Search in sources :

Example 1 with RecentlyPlayEvent

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

the class ArtistFragment method subscribeRecentlyPlayEvent.

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

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

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

Example 2 with RecentlyPlayEvent

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

the class SongsFragment method subscribeRecentlyPlayEvent.

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

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

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

Example 3 with RecentlyPlayEvent

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

the class AlbumFragment method subscribeRecentlyPlayEvent.

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

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

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

Aggregations

RecentlyPlayEvent (io.hefuyi.listener.event.RecentlyPlayEvent)3 Subscription (rx.Subscription)3