From f19b1fb823db4fe1d132acc57f6dc7c368374644 Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Wed, 3 Sep 2014 18:58:46 +0200 Subject: [PATCH] changed order of snackbar hints --- .../ui/ConversationFragment.java | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/eu/siacs/conversations/ui/ConversationFragment.java b/src/eu/siacs/conversations/ui/ConversationFragment.java index d0e5bdb4c..86b5f21fa 100644 --- a/src/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/eu/siacs/conversations/ui/ConversationFragment.java @@ -384,7 +384,16 @@ public class ConversationFragment extends Fragment { final ConversationActivity activity = (ConversationActivity) getActivity(); if (this.conversation != null) { final Contact contact = this.conversation.getContact(); - if (!contact.showInRoster() + if (this.conversation.isMuted()) { + showSnackbar(R.string.notifications_disabled, R.string.enable, new OnClickListener() { + + @Override + public void onClick(View v) { + conversation.setMutedTill(0); + updateMessages(); + } + }); + } else if (!contact.showInRoster() && contact .getOption(Contact.Options.PENDING_SUBSCRIPTION_REQUEST)) { showSnackbar(R.string.contact_added_you, R.string.add_back, @@ -406,16 +415,6 @@ public class ConversationFragment extends Fragment { break; } } - if (this.conversation.isMuted()) { - showSnackbar(R.string.notifications_disabled, R.string.enable, new OnClickListener() { - - @Override - public void onClick(View v) { - conversation.setMutedTill(0); - updateMessages(); - } - }); - } if (this.conversation.getMessages().size() == 0) { this.messageList.clear(); messagesLoaded = false; @@ -494,7 +493,7 @@ public class ConversationFragment extends Fragment { Set knownFingerprints = conversation.getContact() .getOtrFingerprints(); if ((latestEncryption == Message.ENCRYPTION_OTR) - && (conversation.hasValidOtrSession() + && (conversation.hasValidOtrSession() && (!conversation.isMuted()) && (conversation.getOtrSession().getSessionStatus() == SessionStatus.ENCRYPTED) && (!knownFingerprints .contains(conversation.getOtrFingerprint())))) { showSnackbar(R.string.unknown_otr_fingerprint, R.string.verify,