Fix a regression when adding media to a reply
This commit is contained in:
parent
a14962d977
commit
99d2976993
|
@ -245,7 +245,8 @@ public class ComposeActivity extends BaseActivity implements ComposeAdapter.Mana
|
|||
statusList.addAll(0, context.ancestors);
|
||||
composeAdapter.setStatusCount(context.ancestors.size() + 1);
|
||||
composeAdapter.notifyItemRangeInserted(0, context.ancestors.size());
|
||||
// composeAdapter.notifyItemChanged(context.ancestors.size() + 1);
|
||||
|
||||
composeAdapter.notifyItemRangeChanged(0, statusList.size());
|
||||
if (binding.recyclerView.getItemDecorationCount() > 0) {
|
||||
for (int i = 0; i < binding.recyclerView.getItemDecorationCount(); i++) {
|
||||
binding.recyclerView.removeItemDecorationAt(i);
|
||||
|
|
|
@ -397,6 +397,7 @@ public class ComposeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder
|
|||
if (position == -1) {
|
||||
position = statusList.size() - 1;
|
||||
}
|
||||
// position = statusCount-1+position;
|
||||
if (statusList.get(position).media_attachments == null) {
|
||||
statusList.get(position).media_attachments = new ArrayList<>();
|
||||
}
|
||||
|
@ -1096,7 +1097,6 @@ public class ComposeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder
|
|||
} else if (getItemViewType(position) == TYPE_COMPOSE) {
|
||||
Status statusDraft = statusList.get(position);
|
||||
|
||||
|
||||
ComposeViewHolder holder = (ComposeViewHolder) viewHolder;
|
||||
|
||||
boolean displayEmoji = sharedpreferences.getBoolean(context.getString(R.string.SET_DISPLAY_EMOJI), false);
|
||||
|
|
Loading…
Reference in New Issue