aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-04-08 20:46:01 +0200
committerChristian Schneppe <christian@pix-art.de>2018-04-08 20:46:01 +0200
commit4bfeb27953e60b2474382fa338cd637954f478c0 (patch)
tree94a39629247403041b39f6ac3257a601b76d65e4 /src/main/java/de
parent341f9acc36d2c7c7c04240850efe1f041224ae4d (diff)
do not show snackbar for archived conversations. fixes glitch when leaving muc
Diffstat (limited to 'src/main/java/de')
-rw-r--r--src/main/java/de/pixart/messenger/ui/ConversationFragment.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
index 01452d3db..ddf7d6644 100644
--- a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
+++ b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
@@ -2234,8 +2234,11 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
private void updateSnackBar(final Conversation conversation) {
final Account account = conversation.getAccount();
final XmppConnection connection = account.getXmppConnection();
- final Contact contact = conversation.getContact();
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()) {