forked from mirrors/Fedilab
Some fixes
This commit is contained in:
parent
316e750004
commit
8162e3f171
1 changed files with 6 additions and 2 deletions
|
@ -1280,7 +1280,9 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
||||||
public void onGlobalLayout() {
|
public void onGlobalLayout() {
|
||||||
holder.binding.mediaContainer.getViewTreeObserver().removeOnGlobalLayoutListener(this);
|
holder.binding.mediaContainer.getViewTreeObserver().removeOnGlobalLayoutListener(this);
|
||||||
measuredWidth = holder.binding.mediaContainer.getWidth();
|
measuredWidth = holder.binding.mediaContainer.getWidth();
|
||||||
adapter.notifyItemChanged(0, statusList.size());
|
if (adapter != null && statusList != null) {
|
||||||
|
adapter.notifyItemChanged(0, statusList.size());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1294,7 +1296,9 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
|
||||||
holder.binding.displayMedia.setVisibility(View.VISIBLE);
|
holder.binding.displayMedia.setVisibility(View.VISIBLE);
|
||||||
holder.binding.displayMedia.setOnClickListener(v -> {
|
holder.binding.displayMedia.setOnClickListener(v -> {
|
||||||
statusToDeal.canLoadMedia = true;
|
statusToDeal.canLoadMedia = true;
|
||||||
adapter.notifyItemChanged(holder.getBindingAdapterPosition());
|
if (adapter != null) {
|
||||||
|
adapter.notifyItemChanged(holder.getBindingAdapterPosition());
|
||||||
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
int mediaPosition = 1;
|
int mediaPosition = 1;
|
||||||
|
|
Loading…
Reference in a new issue