From 7b103c9b9e19f1e63f5077318a362df8c8ad1cb4 Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 21 Sep 2018 15:36:24 +0000 Subject: [PATCH] Small improvements --- .../eu/faircode/email/AdapterAccount.java | 3 +- .../java/eu/faircode/email/AdapterAnswer.java | 3 +- .../eu/faircode/email/AdapterAttachment.java | 3 +- .../eu/faircode/email/AdapterIdentity.java | 3 +- .../java/eu/faircode/email/AdapterLog.java | 3 +- .../eu/faircode/email/AdapterMessage.java | 2 +- .../eu/faircode/email/AdapterOperation.java | 3 +- app/src/main/res/layout/item_folder.xml | 1 + app/src/main/res/layout/item_message.xml | 329 +++++++++--------- 9 files changed, 176 insertions(+), 174 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/AdapterAccount.java b/app/src/main/java/eu/faircode/email/AdapterAccount.java index 9858bd8192..24b2b62ecf 100644 --- a/app/src/main/java/eu/faircode/email/AdapterAccount.java +++ b/app/src/main/java/eu/faircode/email/AdapterAccount.java @@ -135,8 +135,7 @@ public class AdapterAccount extends RecyclerView.Adapter { public void set(@NonNull List logs) { Log.i(Helper.TAG, "Set logs=" + logs.size()); - all.clear(); - all.addAll(logs); + all = logs; DiffUtil.DiffResult diff = DiffUtil.calculateDiff(new MessageDiffCallback(filtered, all)); diff --git a/app/src/main/java/eu/faircode/email/AdapterMessage.java b/app/src/main/java/eu/faircode/email/AdapterMessage.java index 2ff708d13d..8a8b1b95c8 100644 --- a/app/src/main/java/eu/faircode/email/AdapterMessage.java +++ b/app/src/main/java/eu/faircode/email/AdapterMessage.java @@ -98,7 +98,7 @@ public class AdapterMessage extends PagedListAdapter operations) { Log.i(Helper.TAG, "Set operations=" + operations.size()); - all.clear(); - all.addAll(operations); + all = operations; DiffUtil.DiffResult diff = DiffUtil.calculateDiff(new MessageDiffCallback(filtered, all)); diff --git a/app/src/main/res/layout/item_folder.xml b/app/src/main/res/layout/item_folder.xml index 52306ffca8..cc42f6ac0f 100644 --- a/app/src/main/res/layout/item_folder.xml +++ b/app/src/main/res/layout/item_folder.xml @@ -117,5 +117,6 @@ android:background="?attr/colorSeparator" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/tvError" /> + \ No newline at end of file diff --git a/app/src/main/res/layout/item_message.xml b/app/src/main/res/layout/item_message.xml index 45c5e39b22..664bb765c9 100644 --- a/app/src/main/res/layout/item_message.xml +++ b/app/src/main/res/layout/item_message.xml @@ -1,169 +1,176 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + android:layout_height="wrap_content"> - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file