mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2024-12-23 01:00:04 +02:00
Fix a regression when adding media to a reply
This commit is contained in:
parent
a14962d977
commit
99d2976993
2 changed files with 3 additions and 2 deletions
|
@ -245,7 +245,8 @@ public class ComposeActivity extends BaseActivity implements ComposeAdapter.Mana
|
||||||
statusList.addAll(0, context.ancestors);
|
statusList.addAll(0, context.ancestors);
|
||||||
composeAdapter.setStatusCount(context.ancestors.size() + 1);
|
composeAdapter.setStatusCount(context.ancestors.size() + 1);
|
||||||
composeAdapter.notifyItemRangeInserted(0, context.ancestors.size());
|
composeAdapter.notifyItemRangeInserted(0, context.ancestors.size());
|
||||||
// composeAdapter.notifyItemChanged(context.ancestors.size() + 1);
|
|
||||||
|
composeAdapter.notifyItemRangeChanged(0, statusList.size());
|
||||||
if (binding.recyclerView.getItemDecorationCount() > 0) {
|
if (binding.recyclerView.getItemDecorationCount() > 0) {
|
||||||
for (int i = 0; i < binding.recyclerView.getItemDecorationCount(); i++) {
|
for (int i = 0; i < binding.recyclerView.getItemDecorationCount(); i++) {
|
||||||
binding.recyclerView.removeItemDecorationAt(i);
|
binding.recyclerView.removeItemDecorationAt(i);
|
||||||
|
|
|
@ -397,6 +397,7 @@ public class ComposeAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder
|
||||||
if (position == -1) {
|
if (position == -1) {
|
||||||
position = statusList.size() - 1;
|
position = statusList.size() - 1;
|
||||||
}
|
}
|
||||||
|
// position = statusCount-1+position;
|
||||||
if (statusList.get(position).media_attachments == null) {
|
if (statusList.get(position).media_attachments == null) {
|
||||||
statusList.get(position).media_attachments = new ArrayList<>();
|
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) {
|
} else if (getItemViewType(position) == TYPE_COMPOSE) {
|
||||||
Status statusDraft = statusList.get(position);
|
Status statusDraft = statusList.get(position);
|
||||||
|
|
||||||
|
|
||||||
ComposeViewHolder holder = (ComposeViewHolder) viewHolder;
|
ComposeViewHolder holder = (ComposeViewHolder) viewHolder;
|
||||||
|
|
||||||
boolean displayEmoji = sharedpreferences.getBoolean(context.getString(R.string.SET_DISPLAY_EMOJI), false);
|
boolean displayEmoji = sharedpreferences.getBoolean(context.getString(R.string.SET_DISPLAY_EMOJI), false);
|
||||||
|
|
Loading…
Reference in a new issue