From ecfbe1df43b71cbee229da511fe3089960076286 Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 25 Jun 2019 08:56:59 +0200 Subject: [PATCH] Simplification --- app/src/main/java/eu/faircode/email/FragmentMessages.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentMessages.java b/app/src/main/java/eu/faircode/email/FragmentMessages.java index d89519bc71..643f4eaac9 100644 --- a/app/src/main/java/eu/faircode/email/FragmentMessages.java +++ b/app/src/main/java/eu/faircode/email/FragmentMessages.java @@ -862,7 +862,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences. do { Long key = adapter.getKeyAtPosition(pos); - if (key != null && isExpanded(key)) { + if (key != null && iProperties.getValue("expanded", key)) { int first = llm.findFirstVisibleItemPosition(); View child = rvMessage.getChildAt(pos - (first < 0 ? 0 : first)); @@ -1281,7 +1281,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences. if (message == null || message.uid == null) return null; - if (isExpanded(message.id)) + if (iProperties.getValue("expanded", message.id)) return null; if (EntityFolder.OUTBOX.equals(message.folderType)) @@ -1291,10 +1291,6 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences. } }; - private boolean isExpanded(long id) { - return (values.containsKey("expanded") && values.get("expanded").contains(id)); - } - private void onActionMove(String folderType) { Bundle args = new Bundle(); args.putLong("account", account);