Commit 23296033 authored by Geoffrey Métais's avatar Geoffrey Métais

Avoid invalid scroll

parent 5ea724a1
......@@ -296,6 +296,7 @@ public class AudioPlayerActivity extends BaseTvActivity {
@Override
public void run() {
final int position = model.getCurrentMediaPosition();
if (position < 0) return;
mAdapter.setSelection(position);
int first = ((LinearLayoutManager)mBinding.playlist.getLayoutManager()).findFirstCompletelyVisibleItemPosition();
int last = ((LinearLayoutManager)mBinding.playlist.getLayoutManager()).findLastCompletelyVisibleItemPosition();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment