mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-08 10:03:51 +02:00
Scroll to headers
This commit is contained in:
@@ -1626,6 +1626,19 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||
tvHeaders.setText(HtmlHelper.highlightHeaders(context, message.headers));
|
||||
else
|
||||
tvHeaders.setText(null);
|
||||
|
||||
new Handler().post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
View inHeaders = itemView.findViewById(R.id.inHeaders);
|
||||
|
||||
Rect rect = new Rect();
|
||||
inHeaders.getDrawingRect(rect);
|
||||
((ViewGroup) itemView).offsetDescendantRectToMyCoords(inHeaders, rect);
|
||||
|
||||
properties.scrollTo(getAdapterPosition(), rect.top);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void bindBody(TupleMessageEx message, final boolean scroll) {
|
||||
|
||||
Reference in New Issue
Block a user