Skip to content

Commit

Permalink
Remove deprecated calls
Browse files Browse the repository at this point in the history
#minor-release

PiperOrigin-RevId: 452006137
(cherry picked from commit acb48a2)
  • Loading branch information
marcbaechinger committed May 31, 2022
1 parent ad5788e commit 7671e50
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -230,8 +230,8 @@ public RecyclerViewCallback() {
@Override
public boolean onMove(
RecyclerView list, RecyclerView.ViewHolder origin, RecyclerView.ViewHolder target) {
int fromPosition = origin.getAdapterPosition();
int toPosition = target.getAdapterPosition();
int fromPosition = origin.getBindingAdapterPosition();
int toPosition = target.getBindingAdapterPosition();
if (draggingFromPosition == C.INDEX_UNSET) {
// A drag has started, but changes to the media queue will be reflected in clearView().
draggingFromPosition = fromPosition;
Expand All @@ -243,7 +243,7 @@ public boolean onMove(

@Override
public void onSwiped(RecyclerView.ViewHolder viewHolder, int direction) {
int position = viewHolder.getAdapterPosition();
int position = viewHolder.getBindingAdapterPosition();
QueueItemViewHolder queueItemHolder = (QueueItemViewHolder) viewHolder;
if (playerManager.removeItem(queueItemHolder.item)) {
mediaQueueListAdapter.notifyItemRemoved(position);
Expand Down Expand Up @@ -282,7 +282,7 @@ public QueueItemViewHolder(TextView textView) {

@Override
public void onClick(View v) {
playerManager.selectQueueItem(getAdapterPosition());
playerManager.selectQueueItem(getBindingAdapterPosition());
}
}

Expand Down

0 comments on commit 7671e50

Please sign in to comment.