From 047629b6dc9c91502d2dde008c345ab5cba28e1b Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 12 Sep 2018 11:22:33 +0000 Subject: [PATCH] Fixed dislay issue --- app/src/main/java/eu/faircode/email/FragmentCompose.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentCompose.java b/app/src/main/java/eu/faircode/email/FragmentCompose.java index 7c42cc71..8f25986b 100644 --- a/app/src/main/java/eu/faircode/email/FragmentCompose.java +++ b/app/src/main/java/eu/faircode/email/FragmentCompose.java @@ -968,6 +968,7 @@ public class FragmentCompose extends FragmentEx { } }); + db.attachment().liveAttachments(draft.id).removeObservers(getViewLifecycleOwner()); db.attachment().liveAttachments(draft.id).observe(getViewLifecycleOwner(), new Observer>() { @Override @@ -976,11 +977,11 @@ public class FragmentCompose extends FragmentEx { attachments = new ArrayList<>(); adapter.set(attachments); - if (!free) - grpAttachments.setVisibility(attachments.size() > 0 ? View.VISIBLE : View.GONE); + grpAttachments.setVisibility(!free && attachments.size() > 0 ? View.VISIBLE : View.GONE); } }); + db.message().liveMessage(draft.id).removeObservers(getViewLifecycleOwner()); db.message().liveMessage(draft.id).observe(getViewLifecycleOwner(), new Observer() { @Override public void onChanged(final EntityMessage draft) {