1
0
mirror of https://github.com/moparisthebest/Yaaic synced 2024-11-14 13:05:02 -05:00

ConversationActivity: Part channel on close (via menu)

This commit is contained in:
Sebastian Kaspari 2010-04-11 21:54:44 +02:00
parent c20de9fbd2
commit f5294f2d86

View File

@ -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();
}