aboutsummaryrefslogtreecommitdiffstats
path: root/src/eu/siacs
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2014-05-13 17:11:36 +0200
committerDaniel Gultsch <daniel@gultsch.de>2014-05-13 17:11:36 +0200
commitf1bdf1d4c51d1e15149b1aae80541c0efef93c48 (patch)
tree86b27c9a137ccfbcaadc846969c53b2c744fd6e5 /src/eu/siacs
parent9492e2890208ed8527504d692cfdb07d36d2fa30 (diff)
parent71545f4f665cd4fea6e6ecc1824ffac1f454bce2 (diff)
Merge branch 'development' into feature/take_picture
Diffstat (limited to 'src/eu/siacs')
-rw-r--r--src/eu/siacs/conversations/ui/ConversationActivity.java22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/eu/siacs/conversations/ui/ConversationActivity.java b/src/eu/siacs/conversations/ui/ConversationActivity.java
index a94dc2e5..23fa14b2 100644
--- a/src/eu/siacs/conversations/ui/ConversationActivity.java
+++ b/src/eu/siacs/conversations/ui/ConversationActivity.java
@@ -6,8 +6,6 @@ import java.util.ArrayList;
import java.util.Hashtable;
import java.util.List;
-import org.openintents.openpgp.OpenPgpError;
-
import eu.siacs.conversations.R;
import eu.siacs.conversations.entities.Account;
import eu.siacs.conversations.entities.Contact;
@@ -123,6 +121,10 @@ public class ConversationActivity extends XmppActivity {
public Conversation getSelectedConversation() {
return this.selectedConversation;
}
+
+ public void setSelectedConversation(Conversation conversation) {
+ this.selectedConversation = conversation;
+ }
public ListView getConversationListView() {
return this.listView;
@@ -238,8 +240,8 @@ public class ConversationActivity extends XmppActivity {
public void onItemClick(AdapterView<?> arg0, View clickedView,
int position, long arg3) {
paneShouldBeOpen = false;
- if (selectedConversation != conversationList.get(position)) {
- selectedConversation = conversationList.get(position);
+ if (getSelectedConversation() != conversationList.get(position)) {
+ setSelectedConversation(conversationList.get(position));
swapConversationFragment(); // .onBackendConnected(conversationList.get(position));
} else {
spl.closePane();
@@ -379,7 +381,7 @@ public class ConversationActivity extends XmppActivity {
@Override
public void error(int error) {
- // TODO Auto-generated method stub
+ displayErrorDialog(error);
}
});
@@ -482,7 +484,7 @@ public class ConversationActivity extends XmppActivity {
Intent inviteIntent = new Intent(getApplicationContext(),
ContactsActivity.class);
inviteIntent.setAction("invite");
- inviteIntent.putExtra("uuid", selectedConversation.getUuid());
+ inviteIntent.putExtra("uuid", getSelectedConversation().getUuid());
startActivity(inviteIntent);
break;
case R.id.action_security:
@@ -561,9 +563,9 @@ public class ConversationActivity extends XmppActivity {
spl.openPane();
xmppConnectionService.archiveConversation(conversation);
if (conversationList.size() > 0) {
- selectedConversation = conversationList.get(0);
+ setSelectedConversation(conversationList.get(0));
} else {
- selectedConversation = null;
+ setSelectedConversation(null);
}
}
@@ -649,7 +651,7 @@ public class ConversationActivity extends XmppActivity {
for (int i = 0; i < conversationList.size(); ++i) {
if (conversationList.get(i).getUuid().equals(convToView)) {
- selectedConversation = conversationList.get(i);
+ setSelectedConversation(conversationList.get(i));
}
}
paneShouldBeOpen = false;
@@ -672,7 +674,7 @@ public class ConversationActivity extends XmppActivity {
if (selectedFragment != null) {
selectedFragment.onBackendConnected();
} else {
- selectedConversation = conversationList.get(0);
+ setSelectedConversation(conversationList.get(0));
swapConversationFragment();
}
ExceptionHelper.checkForCrash(this, this.xmppConnectionService);