Rebind instead of notify change

This commit is contained in:
M66B 2019-04-17 09:19:56 +02:00
parent 26be9ced85
commit 9c8f3a1ee8
1 changed files with 6 additions and 6 deletions

View File

@ -1271,18 +1271,18 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
boolean expanded = !properties.getValue("expanded", message.id);
properties.setValue("expanded", message.id, expanded);
int pos = getAdapterPosition();
notifyItemChanged(pos);
if (expanded)
properties.scrollTo(pos, 0);
if (expanded) {
bindExpanded(message);
properties.scrollTo(getAdapterPosition(), 0);
} else
clearExpanded();
}
}
private void onToggleAddresses(TupleMessageEx message) {
boolean addresses = !properties.getValue("addresses", message.id);
properties.setValue("addresses", message.id, addresses);
notifyItemChanged(getAdapterPosition());
bindExpanded(message);
}
private void onDownloadAttachments(final TupleMessageEx message) {