Get the bound pass from the PassViewHolder
This commit is contained in:
parent
8ae2246406
commit
d845a7e025
2 changed files with 3 additions and 3 deletions
|
@ -47,7 +47,7 @@ public class PassAdapter extends RecyclerView.Adapter<PassViewHolder> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onBindViewHolder(final PassViewHolder viewHolder, int longClickedCardPosition) {
|
||||
public void onBindViewHolder(final PassViewHolder viewHolder, int longClickedCardPosition) {
|
||||
final Pass pass = passStoreProjection.getPassList().get(longClickedCardPosition);
|
||||
|
||||
viewHolder.apply(pass, passListActivity);
|
||||
|
@ -93,7 +93,7 @@ public class PassAdapter extends RecyclerView.Adapter<PassViewHolder> {
|
|||
|
||||
@Override
|
||||
public boolean onActionItemClicked(ActionMode actionMode, MenuItem menuItem) {
|
||||
if (new PassMenuOptions(passListActivity, getList().get(viewHolder.getAdapterPosition())).process(menuItem)) {
|
||||
if (new PassMenuOptions(passListActivity, viewHolder.pass).process(menuItem)) {
|
||||
actionMode.finish();
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ public class PassViewHolder extends RecyclerView.ViewHolder {
|
|||
AddToCalendar.tryAddDateToCalendar(pass, activity, getDate());
|
||||
}
|
||||
|
||||
private Pass pass;
|
||||
public Pass pass;
|
||||
private Activity activity;
|
||||
|
||||
public PassViewHolder(View view) {
|
||||
|
|
Loading…
Reference in a new issue