aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/ui/ConversationActivity.java
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2014-03-15 15:13:35 +0100
committerDaniel Gultsch <daniel@gultsch.de>2014-03-15 15:13:35 +0100
commit8cd59bb944ed9373eb04420a32f3b7cfce0a8956 (patch)
treed25bce32c4d272358984d50241320062f1c3008a /src/eu/siacs/conversations/ui/ConversationActivity.java
parent841c6e04a9da5f8eaf00b5140da7b7934ad3cbe3 (diff)
better muc invitations. clearified the creation of ad hoc mucs with an alert dialog
Diffstat (limited to 'src/eu/siacs/conversations/ui/ConversationActivity.java')
-rw-r--r--src/eu/siacs/conversations/ui/ConversationActivity.java17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/eu/siacs/conversations/ui/ConversationActivity.java b/src/eu/siacs/conversations/ui/ConversationActivity.java
index ad643c31..a08e0727 100644
--- a/src/eu/siacs/conversations/ui/ConversationActivity.java
+++ b/src/eu/siacs/conversations/ui/ConversationActivity.java
@@ -74,7 +74,7 @@ public class ConversationActivity extends XmppActivity {
if (conversationList.size() >= 1) {
swapConversationFragment();
} else {
- startActivity(new Intent(getApplicationContext(), NewConversationActivity.class));
+ startActivity(new Intent(getApplicationContext(), ContactsActivity.class));
finish();
}
}
@@ -249,12 +249,14 @@ public class ConversationActivity extends XmppActivity {
MenuItem menuArchive = (MenuItem) menu.findItem(R.id.action_archive);
MenuItem menuMucDetails = (MenuItem) menu.findItem(R.id.action_muc_details);
MenuItem menuContactDetails = (MenuItem) menu.findItem(R.id.action_contact_details);
+ MenuItem menuInviteContacts = (MenuItem) menu.findItem(R.id.action_invite);
if ((spl.isOpen()&&(spl.isSlideable()))) {
menuArchive.setVisible(false);
menuMucDetails.setVisible(false);
menuContactDetails.setVisible(false);
menuSecure.setVisible(false);
+ menuInviteContacts.setVisible(false);
} else {
((MenuItem) menu.findItem(R.id.action_add)).setVisible(!spl.isSlideable());
if (this.getSelectedConversation()!=null) {
@@ -263,9 +265,11 @@ public class ConversationActivity extends XmppActivity {
menuContactDetails.setVisible(false);
menuSecure.setVisible(false);
menuArchive.setTitle("Leave conference");
+ menuInviteContacts.setVisible(true);
} else {
menuContactDetails.setVisible(true);
menuMucDetails.setVisible(false);
+ menuInviteContacts.setVisible(false);
if (this.getSelectedConversation().getLatestMessage().getEncryption() != Message.ENCRYPTION_NONE) {
menuSecure.setIcon(R.drawable.ic_action_secure);
}
@@ -282,7 +286,7 @@ public class ConversationActivity extends XmppActivity {
spl.openPane();
break;
case R.id.action_add:
- startActivity(new Intent(this, NewConversationActivity.class));
+ startActivity(new Intent(this, ContactsActivity.class));
break;
case R.id.action_archive:
Conversation conv = getSelectedConversation();
@@ -319,6 +323,13 @@ public class ConversationActivity extends XmppActivity {
intent.putExtra("uuid", getSelectedConversation().getUuid());
startActivity(intent);
break;
+ case R.id.action_invite:
+ Intent inviteIntent = new Intent(getApplicationContext(),
+ ContactsActivity.class);
+ inviteIntent.setAction("invite");
+ inviteIntent.putExtra("uuid",selectedConversation.getUuid());
+ startActivity(inviteIntent);
+ break;
case R.id.action_security:
final Conversation selConv = getSelectedConversation();
View menuItemView = findViewById(R.id.action_security);
@@ -451,7 +462,7 @@ public class ConversationActivity extends XmppActivity {
finish();
} else if (conversationList.size() <= 0) {
//add no history
- startActivity(new Intent(this, NewConversationActivity.class));
+ startActivity(new Intent(this, ContactsActivity.class));
finish();
} else {
spl.openPane();