use of io.hefuyi.listener.event.MetaChangedEvent in project ListenerMusicPlayer by hefuyicoder.
the class ArtistMusicFragment method subscribeMetaChangedEvent.
private void subscribeMetaChangedEvent() {
Subscription subscription = RxBus.getInstance().toObservable(MetaChangedEvent.class).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).distinctUntilChanged().subscribe(new Action1<MetaChangedEvent>() {
@Override
public void call(MetaChangedEvent event) {
mSongAdapter.notifyDataSetChanged();
}
}, new Action1<Throwable>() {
@Override
public void call(Throwable throwable) {
}
});
RxBus.getInstance().addSubscription(this, subscription);
}
use of io.hefuyi.listener.event.MetaChangedEvent in project ListenerMusicPlayer by hefuyicoder.
the class PlaylistDetailFragment method subscribeMetaChangedEvent.
private void subscribeMetaChangedEvent() {
Subscription subscription = RxBus.getInstance().toObservable(MetaChangedEvent.class).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).distinctUntilChanged().subscribe(new Action1<MetaChangedEvent>() {
@Override
public void call(MetaChangedEvent event) {
mAdapter.notifyDataSetChanged();
}
}, new Action1<Throwable>() {
@Override
public void call(Throwable throwable) {
}
});
RxBus.getInstance().addSubscription(this, subscription);
}
use of io.hefuyi.listener.event.MetaChangedEvent in project ListenerMusicPlayer by hefuyicoder.
the class QuickControlsFragment method subscribeMetaChangedEvent.
private void subscribeMetaChangedEvent() {
Subscription subscription = RxBus.getInstance().toObservable(MetaChangedEvent.class).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).subscribe(new Action1<MetaChangedEvent>() {
@Override
public void call(MetaChangedEvent event) {
mPresenter.updateNowPlayingCard();
mPresenter.loadLyric();
}
}, new Action1<Throwable>() {
@Override
public void call(Throwable throwable) {
}
});
RxBus.getInstance().addSubscription(this, subscription);
}
use of io.hefuyi.listener.event.MetaChangedEvent in project ListenerMusicPlayer by hefuyicoder.
the class FoldersFragment method subscribeMetaChangedEvent.
private void subscribeMetaChangedEvent() {
Subscription subscription = RxBus.getInstance().toObservable(MetaChangedEvent.class).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).distinctUntilChanged().subscribe(new Action1<MetaChangedEvent>() {
@Override
public void call(MetaChangedEvent event) {
mAdapter.notifyDataSetChanged();
}
}, new Action1<Throwable>() {
@Override
public void call(Throwable throwable) {
}
});
RxBus.getInstance().addSubscription(this, subscription);
}
use of io.hefuyi.listener.event.MetaChangedEvent in project ListenerMusicPlayer by hefuyicoder.
the class PlayRankingFragment method subscribeMetaChangedEvent.
private void subscribeMetaChangedEvent() {
Subscription subscription = RxBus.getInstance().toObservable(MetaChangedEvent.class).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).distinctUntilChanged().subscribe(new Action1<MetaChangedEvent>() {
@Override
public void call(MetaChangedEvent event) {
mAdapter.notifyDataSetChanged();
}
}, new Action1<Throwable>() {
@Override
public void call(Throwable throwable) {
}
});
RxBus.getInstance().addSubscription(this, subscription);
}
Aggregations