From 012d0be1c743c8ed1958c053702db8b71d8540d1 Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 19 Mar 2020 17:02:44 +0100 Subject: [PATCH] Go with the flow --- .../eu/faircode/email/AdapterMessage.java | 25 +++++++++++++++---- .../res/layout/include_message_action.xml | 12 +++++---- 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/AdapterMessage.java b/app/src/main/java/eu/faircode/email/AdapterMessage.java index 53d8fbaf2f..306a01e16b 100644 --- a/app/src/main/java/eu/faircode/email/AdapterMessage.java +++ b/app/src/main/java/eu/faircode/email/AdapterMessage.java @@ -111,6 +111,7 @@ import androidx.annotation.Nullable; import androidx.annotation.RequiresApi; import androidx.appcompat.app.AlertDialog; import androidx.appcompat.widget.PopupMenu; +import androidx.constraintlayout.helper.widget.Flow; import androidx.constraintlayout.widget.ConstraintLayout; import androidx.constraintlayout.widget.Group; import androidx.core.content.FileProvider; @@ -421,7 +422,7 @@ public class AdapterMessage extends RecyclerView.Adapter actions = cactions.getConversationActions(); @@ -1970,9 +1983,11 @@ public class AdapterMessage extends RecyclerView.Adapter 0 ? View.VISIBLE : View.GONE); + grpAction.setVisibility(has ? View.VISIBLE : View.GONE); } } diff --git a/app/src/main/res/layout/include_message_action.xml b/app/src/main/res/layout/include_message_action.xml index 456abf5868..eee9ea17cf 100644 --- a/app/src/main/res/layout/include_message_action.xml +++ b/app/src/main/res/layout/include_message_action.xml @@ -29,12 +29,14 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/vSeparatorAction" /> - @@ -43,5 +45,5 @@ android:id="@+id/grpAction" android:layout_width="0dp" android:layout_height="0dp" - app:constraint_referenced_ids="vSeparatorAction,tvActionTitle,llAction" /> + app:constraint_referenced_ids="vSeparatorAction,tvActionTitle,flow" /> \ No newline at end of file