Fixed staying in channel when conversation is closed.

This commit is contained in:
Torben Nielsen 2010-04-11 21:04:34 +02:00
parent 64dde2de90
commit 661cae9f53
2 changed files with 5 additions and 1 deletions

View File

@ -10,4 +10,4 @@
# Indicates whether an apk should be generated for each density.
split.density=false
# Project target.
target=android-3
target=android-7

View File

@ -241,6 +241,10 @@ public class ConversationActivity extends Activity implements ServiceConnection,
break;
case R.id.close:
Conversation conversationToClose = deckAdapter.getItem(deck.getSelectedItemPosition());
// Make sure we part a channel when closing the channel conversation
if(conversationToClose.getType() == Conversation.TYPE_CHANNEL) {
binder.getService().getConnection(serverId).partChannel(conversationToClose.getName());
}
if (conversationToClose.getType() != Conversation.TYPE_SERVER) {
onRemoveConversation(conversationToClose.getName());
} else {