aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-09-03 18:58:46 +0200
committeriNPUTmice <daniel@gultsch.de>2014-09-03 18:58:46 +0200
commitf19b1fb823db4fe1d132acc57f6dc7c368374644 (patch)
tree52c741b827829f0b0ac57bb55f59adff048a94cc /src
parentceddf99aa37c218a3edc865163c54d26f34d2ff3 (diff)
changed order of snackbar hints
Diffstat (limited to 'src')
-rw-r--r--src/eu/siacs/conversations/ui/ConversationFragment.java23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/eu/siacs/conversations/ui/ConversationFragment.java b/src/eu/siacs/conversations/ui/ConversationFragment.java
index d0e5bdb4..86b5f21f 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<String> 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,