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() {
@Override
public void onClick(View v) {
if (holder.getAdapterPosition() != RecyclerView.NO_POSITION) {
Object o = items.get(holder.getAdapterPosition());
int pos = holder.getAdapterPosition();
if ( pos != RecyclerView.NO_POSITION) {
Object o = items.get(pos);
if (o instanceof ApplicationMode) {
final ApplicationMode item = (ApplicationMode) o;
int iconRes = item.getParent() == null