From 111735769c7b6295f615175010442fef8a9f7d03 Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 31 Jan 2019 09:11:55 +0000 Subject: [PATCH] Replace transient state by position check --- .../eu/faircode/email/AdapterMessage.java | 24 +++++++------------ 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/AdapterMessage.java b/app/src/main/java/eu/faircode/email/AdapterMessage.java index 2dec4a6d71..ea3a95ce5a 100644 --- a/app/src/main/java/eu/faircode/email/AdapterMessage.java +++ b/app/src/main/java/eu/faircode/email/AdapterMessage.java @@ -496,11 +496,11 @@ public class AdapterMessage extends RecyclerView.Adapter() { @Override protected void onPreExecute(Bundle args) { + args.putInt("position", position); ivAvatar.setVisibility(avatars ? View.INVISIBLE : View.GONE); tvFrom.setText(MessageHelper.formatAddresses(addresses, !compact, false)); } @@ -778,6 +778,7 @@ public class AdapterMessage extends RecyclerView.Adapter>() { @Override protected void onPreExecute(Bundle args) { + args.putInt("position", position); bnvActions.setHasTransientState(true); } @@ -794,6 +795,9 @@ public class AdapterMessage extends RecyclerView.Adapter folders) { + if (args.getInt("position") != position) + return; + boolean hasJunk = false; boolean hasTrash = false; boolean hasArchive = false; @@ -1235,20 +1239,7 @@ public class AdapterMessage extends RecyclerView.Adapter 0);