aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/ui/ConversationFragment.java
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2014-09-20 16:02:49 +0200
committeriNPUTmice <daniel@gultsch.de>2014-09-20 16:02:49 +0200
commit0b86f65bdc8dfd979be752798b7cbc3c28317c53 (patch)
treecca3a81bee22c5ed0c3446a04d620d7b0c6079e5 /src/eu/siacs/conversations/ui/ConversationFragment.java
parent295bfb7f1de98649d8a7dd5f77745e50bfc25f56 (diff)
fixed #470
Diffstat (limited to 'src/eu/siacs/conversations/ui/ConversationFragment.java')
-rw-r--r--src/eu/siacs/conversations/ui/ConversationFragment.java32
1 files changed, 23 insertions, 9 deletions
diff --git a/src/eu/siacs/conversations/ui/ConversationFragment.java b/src/eu/siacs/conversations/ui/ConversationFragment.java
index ea0a6f14..299bf281 100644
--- a/src/eu/siacs/conversations/ui/ConversationFragment.java
+++ b/src/eu/siacs/conversations/ui/ConversationFragment.java
@@ -275,11 +275,23 @@ public class ConversationFragment extends Fragment {
@Override
public void onContactPictureClicked(Message message) {
- if (message.getConversation().getMode() == Conversation.MODE_MULTI) {
- if (message.getPresence() != null) {
- highlightInConference(message.getPresence());
+ if (message.getStatus() <= Message.STATUS_RECEIVED) {
+ if (message.getConversation().getMode() == Conversation.MODE_MULTI) {
+ if (message.getPresence() != null) {
+ highlightInConference(message.getPresence());
+ } else {
+ highlightInConference(message
+ .getCounterpart());
+ }
} else {
- highlightInConference(message.getCounterpart());
+ Contact contact = message.getConversation()
+ .getContact();
+ if (contact.showInRoster()) {
+ activity.switchToContactDetails(contact);
+ } else {
+ activity.showAddToRosterDialog(message
+ .getConversation());
+ }
}
}
}
@@ -289,11 +301,13 @@ public class ConversationFragment extends Fragment {
@Override
public void onContactPictureLongClicked(Message message) {
- if (message.getConversation().getMode() == Conversation.MODE_MULTI) {
- if (message.getPresence() != null) {
- privateMessageWith(message.getPresence());
- } else {
- privateMessageWith(message.getCounterpart());
+ if (message.getStatus() <= Message.STATUS_RECEIVED) {
+ if (message.getConversation().getMode() == Conversation.MODE_MULTI) {
+ if (message.getPresence() != null) {
+ privateMessageWith(message.getPresence());
+ } else {
+ privateMessageWith(message.getCounterpart());
+ }
}
}
}