minor refactoring

This commit is contained in:
madwasp79 2019-06-06 16:36:52 +03:00
parent b0e786a6b6
commit 7c61a915dc

View file

@ -86,8 +86,9 @@ public class ProfileMenuAdapter extends RecyclerView.Adapter<ProfileViewHolder>
new OnClickListener() { new OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
if (holder.getAdapterPosition() != RecyclerView.NO_POSITION) { int pos = holder.getAdapterPosition();
Object o = items.get(holder.getAdapterPosition()); if ( pos != RecyclerView.NO_POSITION) {
Object o = items.get(pos);
if (o instanceof ApplicationMode) { if (o instanceof ApplicationMode) {
final ApplicationMode item = (ApplicationMode) o; final ApplicationMode item = (ApplicationMode) o;
int iconRes = item.getParent() == null int iconRes = item.getParent() == null