aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs/conversations/ui/ConversationActivity.java
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-02-28 18:46:01 +0100
committerDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-02-28 18:46:01 +0100
commitacf80bddd07d5579cdb20a888b3f9e99e53030a5 (patch)
tree034a8e364488c89c8e1997f56313d919019afa65 /src/eu/siacs/conversations/ui/ConversationActivity.java
parent03d96266f8bbb76e25610e903d74a0afa7dcd03b (diff)
rebranding
Diffstat (limited to '')
-rw-r--r--src/eu/siacs/conversations/ui/ConversationActivity.java (renamed from src/de/gultsch/chat/ui/ConversationActivity.java)43
1 files changed, 20 insertions, 23 deletions
diff --git a/src/de/gultsch/chat/ui/ConversationActivity.java b/src/eu/siacs/conversations/ui/ConversationActivity.java
index 88d30bc5..7660b8fd 100644
--- a/src/de/gultsch/chat/ui/ConversationActivity.java
+++ b/src/eu/siacs/conversations/ui/ConversationActivity.java
@@ -1,22 +1,16 @@
-package de.gultsch.chat.ui;
+package eu.siacs.conversations.ui;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
-import org.openintents.openpgp.OpenPgpSignatureResult;
-import org.openintents.openpgp.util.OpenPgpConstants;
-
-import de.gultsch.chat.R;
-import de.gultsch.chat.R.id;
-import de.gultsch.chat.crypto.PgpEngine;
-import de.gultsch.chat.crypto.PgpEngine.UserInputRequiredException;
-import de.gultsch.chat.entities.Account;
-import de.gultsch.chat.entities.Contact;
-import de.gultsch.chat.entities.Conversation;
-import de.gultsch.chat.entities.Message;
-import de.gultsch.chat.utils.UIHelper;
+import eu.siacs.conversations.R;
+import eu.siacs.conversations.entities.Account;
+import eu.siacs.conversations.entities.Contact;
+import eu.siacs.conversations.entities.Conversation;
+import eu.siacs.conversations.entities.Message;
+import eu.siacs.conversations.utils.UIHelper;
import android.net.Uri;
import android.os.Bundle;
import android.app.AlertDialog;
@@ -25,7 +19,6 @@ import android.app.NotificationManager;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
-import android.content.IntentSender.SendIntentException;
import android.graphics.Typeface;
import android.support.v4.widget.SlidingPaneLayout;
import android.support.v4.widget.SlidingPaneLayout.PanelSlideListener;
@@ -67,7 +60,6 @@ public class ConversationActivity extends XmppActivity {
@Override
public void onConversationListChanged() {
- final Conversation currentConv = getSelectedConversation();
conversationList.clear();
conversationList.addAll(xmppConnectionService
.getConversations());
@@ -104,8 +96,6 @@ public class ConversationActivity extends XmppActivity {
xmppConnectionService.createContact(contact);
}
};
- private boolean contactInserted = false;
-
public List<Conversation> getConversationList() {
return this.conversationList;
@@ -206,7 +196,7 @@ public class ConversationActivity extends XmppActivity {
}
}
});
- spl = (SlidingPaneLayout) findViewById(id.slidingpanelayout);
+ spl = (SlidingPaneLayout) findViewById(R.id.slidingpanelayout);
spl.setParallaxDistance(150);
spl.setShadowResource(R.drawable.es_slidingpane_shadow);
spl.setSliderFadeColor(0);
@@ -257,19 +247,26 @@ public class ConversationActivity extends XmppActivity {
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.conversations, menu);
MenuItem menuSecure = (MenuItem) menu.findItem(R.id.action_security);
+ 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);
if (spl.isOpen()) {
- ((MenuItem) menu.findItem(R.id.action_archive)).setVisible(false);
- ((MenuItem) menu.findItem(R.id.action_details)).setVisible(false);
+ menuArchive.setVisible(false);
+ menuMucDetails.setVisible(false);
+ menuContactDetails.setVisible(false);
menuSecure.setVisible(false);
} else {
((MenuItem) menu.findItem(R.id.action_add)).setVisible(false);
if (this.getSelectedConversation()!=null) {
if (this.getSelectedConversation().getMode() == Conversation.MODE_MULTI) {
- ((MenuItem) menu.findItem(R.id.action_security)).setVisible(false);
+ menuMucDetails.setVisible(true);
+ menuContactDetails.setVisible(false);
menuSecure.setVisible(false);
- ((MenuItem) menu.findItem(R.id.action_archive)).setTitle("Leave conference");
+ menuArchive.setTitle("Leave conference");
} else {
+ menuContactDetails.setVisible(true);
+ menuMucDetails.setVisible(false);
if (this.getSelectedConversation().getLatestMessage().getEncryption() != Message.ENCRYPTION_NONE) {
menuSecure.setIcon(R.drawable.ic_action_secure);
}
@@ -302,7 +299,7 @@ public class ConversationActivity extends XmppActivity {
xmppConnectionService.archiveConversation(conv);
selectedConversation = conversationList.get(0);
break;
- case R.id.action_details:
+ case R.id.action_contact_details:
DialogContactDetails details = new DialogContactDetails();
Contact contact = this.getSelectedConversation().getContact();
if (contact != null) {