Skip to content
Snippets Groups Projects
Commit d4c5be42 authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Delay Artist/Genres tab skipping

onCurrentListChanged callback is fired too soon
parent 6df8b059
No related branches found
No related tags found
Loading
......@@ -187,9 +187,15 @@ public class AudioAlbumsSongsFragment extends BaseAudioBrowser implements SwipeR
@Override
public void onUpdateFinished(RecyclerView.Adapter adapter) {
super.onUpdateFinished(adapter);
mFastScroller.setRecyclerView(getCurrentRV(), getViewModel().getTotalCount());
mSwipeRefreshLayout.setRefreshing(false);
if (mAlbumsAdapter.isEmpty() && !getViewModel().isFiltering()) mViewPager.setCurrentItem(1);
mHandler.post(new Runnable() {
@Override
public void run() {
mFastScroller.setRecyclerView(getCurrentRV(), getViewModel().getTotalCount());
mSwipeRefreshLayout.setRefreshing(false);
final List<Album> albums = albumModel.getPagedList().getValue();
if (Util.isListEmpty(albums) && !getViewModel().isFiltering()) mViewPager.setCurrentItem(1);
}
});
}
/*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment