From c2db9405941e537bad406a07d57ac907a247ab13 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Wed, 14 Mar 2018 13:05:50 +0100 Subject: [PATCH] do not show snackbar for archived conversations. fixes glitch when leaving muc --- .../java/eu/siacs/conversations/ui/ChooseContactActivity.java | 1 - .../java/eu/siacs/conversations/ui/ConversationFragment.java | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/ui/ChooseContactActivity.java b/src/main/java/eu/siacs/conversations/ui/ChooseContactActivity.java index 9b2d0e319..72197b525 100644 --- a/src/main/java/eu/siacs/conversations/ui/ChooseContactActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ChooseContactActivity.java @@ -9,7 +9,6 @@ import android.support.annotation.StringRes; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentTransaction; import android.support.v7.app.ActionBar; -import android.util.Log; import android.view.ActionMode; import android.view.Menu; import android.view.MenuInflater; diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java index d8c7d1549..13f57d7d9 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java @@ -1915,6 +1915,9 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke final XmppConnection connection = account.getXmppConnection(); final int mode = conversation.getMode(); final Contact contact = mode == Conversation.MODE_SINGLE ? conversation.getContact() : null; + if (conversation.getStatus() == Conversation.STATUS_ARCHIVED) { + return; + } if (account.getStatus() == Account.State.DISABLED) { showSnackbar(R.string.this_account_is_disabled, R.string.enable, this.mEnableAccountListener); } else if (conversation.isBlocked()) {