Up/down for WebView too

This commit is contained in:
M66B 2023-02-23 19:05:42 +01:00
parent 9d5acdd823
commit 400f6d1a79
1 changed files with 9 additions and 0 deletions

View File

@ -2184,6 +2184,15 @@ public class FragmentMessages extends FragmentBase
else
llm.scrollToPositionWithOffset(pos, -child.getPaddingTop());
View wvBody = child.findViewById(R.id.wvBody);
if (wvBody instanceof WebView) {
if (bottom) {
int ch = ((WebView) wvBody).getContentHeight();
wvBody.scrollTo(0, Helper.dp2pixels(wvBody.getContext(), ch));
} else
wvBody.scrollTo(0, 0);
}
break;
}
}