1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-03-04 10:39:25 +00:00

Fixed displaying read

This commit is contained in:
M66B 2020-03-22 20:14:54 +01:00
parent 315965e1a4
commit 2bcc99e0fd

View file

@ -3088,9 +3088,19 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
.putExtra("id", message.id));
else {
boolean expanded = !properties.getValue("expanded", message.id);
// Prevent flicker
if (expanded &&
(message.accountProtocol != EntityAccount.TYPE_IMAP ||
(message.accountAutoSeen && !message.ui_seen && !message.folderReadOnly))) {
message.unseen = 0;
message.ui_seen = true;
}
properties.setValue("expanded", message.id, expanded);
bindTo(message, expanded);
properties.setExpanded(message, expanded);
// Needed to scroll to item after collapsing other items
if (expanded)
properties.scrollTo(getAdapterPosition(), 0);