Updated selection tracker

pull/178/head
M66B 5 years ago
parent b682be5d97
commit 09714714d2

@ -85,7 +85,7 @@ public final class StableIdKeyProvider extends ItemKeyProvider<Long> {
} }
return; return;
} }
int position = holder.getAdapterPosition(); int position = holder.getAbsoluteAdapterPosition();
long id = holder.getItemId(); long id = holder.getItemId();
if (position != RecyclerView.NO_POSITION && id != RecyclerView.NO_ID) { if (position != RecyclerView.NO_POSITION && id != RecyclerView.NO_ID) {
mPositionToKey.put(position, id); mPositionToKey.put(position, id);
@ -102,7 +102,7 @@ public final class StableIdKeyProvider extends ItemKeyProvider<Long> {
} }
return; return;
} }
int position = holder.getAdapterPosition(); int position = holder.getAbsoluteAdapterPosition();
long id = holder.getItemId(); long id = holder.getItemId();
if (position != RecyclerView.NO_POSITION && id != RecyclerView.NO_ID) { if (position != RecyclerView.NO_POSITION && id != RecyclerView.NO_ID) {
mPositionToKey.delete(position); mPositionToKey.delete(position);

@ -263,7 +263,7 @@ final class ViewAutoScroller extends AutoScroller {
@Override @Override
void scrollBy(int dy) { void scrollBy(int dy) {
if (VERBOSE) Log.v(TAG, "Scrolling view by: " + dy); if (VERBOSE) Log.v(TAG, "Scrolling view by: " + dy);
mView.scrollBy(0, dy); mView.nestedScrollBy(0, dy);
} }
@Override @Override

Loading…
Cancel
Save