From 99f3c224af992eb3a528b5bc068e51d0914403aa Mon Sep 17 00:00:00 2001 From: M66B Date: Mon, 18 Apr 2022 14:29:03 +0200 Subject: [PATCH] Refactoring --- .../main/java/eu/faircode/email/FragmentMessages.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentMessages.java b/app/src/main/java/eu/faircode/email/FragmentMessages.java index d6f72d6091..8c78d7a9c9 100644 --- a/app/src/main/java/eu/faircode/email/FragmentMessages.java +++ b/app/src/main/java/eu/faircode/email/FragmentMessages.java @@ -6875,12 +6875,14 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences. return (up && onReply(context)); case KeyEvent.KEYCODE_PAGE_UP: case KeyEvent.KEYCODE_DPAD_UP: - return (down && onScroll(context, true, - viewType == AdapterMessage.ViewType.THREAD ? 0.125f : 0.25f)); + if (viewType == AdapterMessage.ViewType.THREAD) + return (down && onScroll(context, true, 0.125f)); + break; case KeyEvent.KEYCODE_PAGE_DOWN: case KeyEvent.KEYCODE_DPAD_DOWN: - return (down && onScroll(context, false, - viewType == AdapterMessage.ViewType.THREAD ? 0.125f : 0.25f)); + if (viewType == AdapterMessage.ViewType.THREAD) + return (down && onScroll(context, false, 0.125f)); + break; } if (!up)