aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-04-09 10:59:54 +0200
committerDaniel Gultsch <daniel@gultsch.de>2016-04-09 10:59:54 +0200
commitb99d70bfe74ce5dff1c8ed26d7f3dbd577a22125 (patch)
tree6b9b013198bd9e469f6dd4a908b3d495bcdafa9d /src
parent2713fd50c830e0c139ea4ae3194bdd60126bb968 (diff)
don't show contact details when in conversations with self
Diffstat (limited to 'src')
-rw-r--r--src/main/java/eu/siacs/conversations/entities/Conversation.java4
-rw-r--r--src/main/java/eu/siacs/conversations/ui/ConversationActivity.java1
-rw-r--r--src/main/java/eu/siacs/conversations/ui/ConversationFragment.java4
3 files changed, 8 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/entities/Conversation.java b/src/main/java/eu/siacs/conversations/entities/Conversation.java
index 0252ea749..a3ae906b5 100644
--- a/src/main/java/eu/siacs/conversations/entities/Conversation.java
+++ b/src/main/java/eu/siacs/conversations/entities/Conversation.java
@@ -336,6 +336,10 @@ public class Conversation extends AbstractEntity implements Blockable {
return this.correctingMessage;
}
+ public boolean withSelf() {
+ return getContact().isSelf();
+ }
+
public interface OnMessageFound {
void onMessageFound(final Message message);
}
diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java
index 02a203804..920c07af1 100644
--- a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java
@@ -411,6 +411,7 @@ public class ConversationActivity extends XmppActivity
menuInviteContact.setVisible(getSelectedConversation().getMucOptions().canInvite());
menuSecure.setVisible((Config.supportOpenPgp() || Config.supportOmemo()) && Config.multipleEncryptionChoices()); //only if pgp is supported we have a choice
} else {
+ menuContactDetails.setVisible(!this.getSelectedConversation().withSelf());
menuMucDetails.setVisible(false);
menuSecure.setVisible(Config.multipleEncryptionChoices());
}
diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
index 1a834ae50..095bf58fa 100644
--- a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
+++ b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
@@ -468,7 +468,9 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
highlightInConference(user);
}
} else {
- activity.switchToContactDetails(message.getContact(), message.getFingerprint());
+ if (!message.getContact().isSelf()) {
+ activity.switchToContactDetails(message.getContact(), message.getFingerprint());
+ }
}
} else {
Account account = message.getConversation().getAccount();