From dfa030af027c9d8cadf99789f9d5ff75ae963922 Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 21 Nov 2021 18:25:27 +0100 Subject: [PATCH] Revert "Refactoring" This reverts commit d410cae77b3176f6e479f803c49e1b0248f56565. --- .../eu/faircode/email/FragmentMessages.java | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentMessages.java b/app/src/main/java/eu/faircode/email/FragmentMessages.java index 9a02d28fbf..7e793b73c6 100644 --- a/app/src/main/java/eu/faircode/email/FragmentMessages.java +++ b/app/src/main/java/eu/faircode/email/FragmentMessages.java @@ -2123,9 +2123,8 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences. if (message == null) return 0; - boolean expanded = iProperties.getValue("expanded", message.id); - - if (experiments && expanded) + if (experiments && + iProperties.getValue("expanded", message.id)) return makeMovementFlags(0, ItemTouchHelper.LEFT | ItemTouchHelper.RIGHT); if (EntityFolder.OUTBOX.equals(message.folderType)) @@ -2200,10 +2199,9 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences. if (message == null) return; - boolean expanded = iProperties.getValue("expanded", message.id); - TupleAccountSwipes swipes; - if (experiments && expanded) { + if (experiments && + iProperties.getValue("expanded", message.id)) { swipes = new TupleAccountSwipes(); swipes.swipe_right = EntityMessage.SWIPE_ACTION_REPLY; swipes.right_type = null; @@ -2341,9 +2339,8 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences. return; } - boolean expanded = iProperties.getValue("expanded", message.id); - - if (experiments && expanded) { + if (experiments && + iProperties.getValue("expanded", message.id)) { adapter.notifyItemChanged(pos); onMenuReply(message, "reply", null); return; @@ -2430,9 +2427,8 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences. if (message == null) return null; - boolean expanded = iProperties.getValue("expanded", message.id); - - if (!experiments && expanded) + if (!experiments && + iProperties.getValue("expanded", message.id)) return null; return message;