mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-12-15 21:31:47 +01:00
commit
f4f4f062cf
@ -131,16 +131,15 @@ public abstract class BaseListFragment<I, N> extends BaseStateFragment<I>
|
|||||||
}
|
}
|
||||||
|
|
||||||
private int getFocusedPosition() {
|
private int getFocusedPosition() {
|
||||||
View focusedItem = itemsList.getFocusedChild();
|
try {
|
||||||
if (focusedItem != null) {
|
final View focusedItem = itemsList.getFocusedChild();
|
||||||
RecyclerView.ViewHolder itemHolder = itemsList.findContainingViewHolder(focusedItem);
|
final RecyclerView.ViewHolder itemHolder =
|
||||||
if (itemHolder != null) {
|
itemsList.findContainingViewHolder(focusedItem);
|
||||||
return itemHolder.getAdapterPosition();
|
return itemHolder.getAdapterPosition();
|
||||||
}
|
} catch (NullPointerException e) {
|
||||||
}
|
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void writeTo(final Queue<Object> objectsToSave) {
|
public void writeTo(final Queue<Object> objectsToSave) {
|
||||||
|
Loading…
Reference in New Issue
Block a user