1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-29 11:15:51 +00:00

prevent scroll on update

This commit is contained in:
M66B 2020-04-16 21:23:23 +02:00
parent 1b0af321f7
commit 76590055c8

View file

@ -1477,8 +1477,21 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
// Message text
tvNoInternetBody.setVisibility(suitable || message.content ? View.GONE : View.VISIBLE);
grpDownloading.setVisibility(message.content ? View.GONE : View.VISIBLE);
tvBody.setVisibility(View.GONE);
wvBody.setVisibility(View.GONE);
int height = properties.getHeight(message.id, 0);
if (height == 0) {
tvBody.setVisibility(View.GONE);
wvBody.setVisibility(View.GONE);
} else {
boolean show_full = properties.getValue("full", message.id);
if (show_full) {
wvBody.setVisibility(View.INVISIBLE);
wvBody.setMinimumHeight(height);
} else {
tvBody.setVisibility(View.INVISIBLE);
tvBody.setMinHeight(height);
}
}
pbBody.setVisibility(View.GONE);
grpAction.setVisibility(View.GONE);
clearActions();