remove freezes

This commit is contained in:
Thomas 2023-02-16 18:41:32 +01:00
parent 0bd1a8e5de
commit 187d20cc15
1 changed files with 5 additions and 1 deletions

View File

@ -1426,7 +1426,11 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
@Override
public void onGlobalLayout() {
holder.binding.mediaContainer.getViewTreeObserver().removeOnGlobalLayoutListener(this);
measuredWidth = holder.binding.mediaContainer.getWidth();
if (fullAttachement) {
measuredWidth = holder.binding.mediaContainer.getWidth();
} else {
measuredWidth = holder.binding.media.mediaContainer.getWidth();
}
if (adapter != null && statusList != null) {
adapter.notifyItemChanged(0, statusList.size());
}