aboutsummaryrefslogtreecommitdiffstats
path: root/src/de/gultsch/chat/ui/ConversationActivity.java
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-02-10 03:34:00 +0100
committerDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-02-10 03:34:00 +0100
commit2d0c0e6a4081955b68669c82071a5099e2e1a96e (patch)
tree229879dfa6611547331849952b220f5fd4b82d54 /src/de/gultsch/chat/ui/ConversationActivity.java
parentc6440aab12460490ef8e9167eac0b515e04f1cdf (diff)
contact badges
Diffstat (limited to 'src/de/gultsch/chat/ui/ConversationActivity.java')
-rw-r--r--src/de/gultsch/chat/ui/ConversationActivity.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/de/gultsch/chat/ui/ConversationActivity.java b/src/de/gultsch/chat/ui/ConversationActivity.java
index 37a988fb..c5c03b12 100644
--- a/src/de/gultsch/chat/ui/ConversationActivity.java
+++ b/src/de/gultsch/chat/ui/ConversationActivity.java
@@ -37,6 +37,8 @@ public class ConversationActivity extends XmppActivity {
public static final String VIEW_CONVERSATION = "viewConversation";
public static final String CONVERSATION = "conversationUuid";
+
+ public static final int INSERT_CONTACT = 0x9889;
protected SlidingPaneLayout spl;
@@ -83,6 +85,7 @@ public class ConversationActivity extends XmppActivity {
});
}
};
+ private boolean contactInserted = false;
public List<Conversation> getConversationList() {
@@ -229,6 +232,8 @@ public class ConversationActivity extends XmppActivity {
if (this.getSelectedConversation()!=null) {
if (this.getSelectedConversation().getMode() == Conversation.MODE_MULTI) {
((MenuItem) menu.findItem(R.id.action_security)).setVisible(false);
+ ((MenuItem) menu.findItem(R.id.action_details)).setVisible(false);
+ ((MenuItem) menu.findItem(R.id.action_archive)).setTitle("Leave conference");
}
}
}
@@ -322,6 +327,13 @@ public class ConversationActivity extends XmppActivity {
@Override
void onBackendConnected() {
+
+ if (contactInserted) {
+ Log.d("xmppService","merge phone contacts with roster");
+ contactInserted = false;
+ xmppConnectionService.mergePhoneContactsWithRoster();
+ }
+
xmppConnectionService.setOnConversationListChangedListener(this.onConvChanged);
if (conversationList.size()==0) {
@@ -375,4 +387,11 @@ public class ConversationActivity extends XmppActivity {
}
}
}
+
+ protected void onActivityResult(int requestCode, int resultCode, Intent data) {
+ if (requestCode==INSERT_CONTACT) {
+ Log.d("xmppService","contact inserted");
+ this.contactInserted = true;
+ }
+ }
}