From f5294f2d8628a24e81bbad86bc79bb56c8ac0fb3 Mon Sep 17 00:00:00 2001 From: Sebastian Kaspari Date: Sun, 11 Apr 2010 21:54:44 +0200 Subject: [PATCH] ConversationActivity: Part channel on close (via menu) --- src/org/yaaic/activity/ConversationActivity.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/org/yaaic/activity/ConversationActivity.java b/src/org/yaaic/activity/ConversationActivity.java index 74b1cbd..aacc799 100644 --- a/src/org/yaaic/activity/ConversationActivity.java +++ b/src/org/yaaic/activity/ConversationActivity.java @@ -242,7 +242,11 @@ public class ConversationActivity extends Activity implements ServiceConnection, case R.id.close: Conversation conversationToClose = deckAdapter.getItem(deck.getSelectedItemPosition()); if (conversationToClose.getType() != Conversation.TYPE_SERVER) { - onRemoveConversation(conversationToClose.getName()); + if (conversationToClose.getType() == Conversation.TYPE_CHANNEL) { + binder.getService().getConnection(server.getId()).partChannel(conversationToClose.getName()); + } else { + onRemoveConversation(conversationToClose.getName()); + } } else { Toast.makeText(this, "You can not close the server info window", Toast.LENGTH_SHORT).show(); }