From 4bade08af82908c1e2d7ee4c79bb7c07458dfb46 Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 28 Jul 2021 09:04:12 +0200 Subject: [PATCH] Reduced thread keyboard scroll distance --- app/src/main/java/eu/faircode/email/FragmentMessages.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentMessages.java b/app/src/main/java/eu/faircode/email/FragmentMessages.java index 406fc329e0..c346c8a2d3 100644 --- a/app/src/main/java/eu/faircode/email/FragmentMessages.java +++ b/app/src/main/java/eu/faircode/email/FragmentMessages.java @@ -6196,8 +6196,9 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences. } private boolean onScroll(Context context, boolean up) { - rvMessage.scrollBy(0, (up ? -1 : 1) * - context.getResources().getDisplayMetrics().heightPixels / 2); + int h = context.getResources().getDisplayMetrics().heightPixels; + h = h / (viewType == AdapterMessage.ViewType.THREAD ? 8 : 2); + rvMessage.scrollBy(0, (up ? -1 : 1) * h); return true; } };