From 4a960bc2d29b34255e699e88e07b4b1a2113c099 Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 13 Oct 2019 09:54:40 +0200 Subject: [PATCH] Simplification --- app/src/main/java/eu/faircode/email/FragmentMessages.java | 4 ++-- 1 file changed, 2 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 4dbf1081d0..c8f5fae96a 100644 --- a/app/src/main/java/eu/faircode/email/FragmentMessages.java +++ b/app/src/main/java/eu/faircode/email/FragmentMessages.java @@ -517,8 +517,8 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences. if (pos == RecyclerView.NO_POSITION) return null; - TupleMessageEx prev = (pos > 0 ? adapter.getCurrentList().get(pos - 1) : null); - TupleMessageEx message = adapter.getCurrentList().get(pos); + TupleMessageEx prev = adapter.getItemAtPosition(pos - 1); + TupleMessageEx message = adapter.getItemAtPosition(pos); if (pos > 0 && prev == null) return null; if (message == null)