Some fixes

This commit is contained in:
Thomas 2023-01-11 18:22:29 +01:00
parent 316e750004
commit 8162e3f171

View file

@ -1280,8 +1280,10 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
public void onGlobalLayout() {
holder.binding.mediaContainer.getViewTreeObserver().removeOnGlobalLayoutListener(this);
measuredWidth = holder.binding.mediaContainer.getWidth();
if (adapter != null && statusList != null) {
adapter.notifyItemChanged(0, statusList.size());
}
}
});
}
LayoutInflater inflater = ((Activity) context).getLayoutInflater();
@ -1294,7 +1296,9 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
holder.binding.displayMedia.setVisibility(View.VISIBLE);
holder.binding.displayMedia.setOnClickListener(v -> {
statusToDeal.canLoadMedia = true;
if (adapter != null) {
adapter.notifyItemChanged(holder.getBindingAdapterPosition());
}
});
} else {
int mediaPosition = 1;