1
0
mirror of https://github.com/moparisthebest/Yaaic synced 2024-11-04 16:35:05 -05:00

Merged patch of tkn

This commit is contained in:
Sebastian Kaspari 2010-04-11 22:11:47 +02:00
parent c866d7ef3e
commit f0aabcde8b

View File

@ -242,15 +242,11 @@ public class ConversationActivity extends Activity implements ServiceConnection,
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) {
if (conversationToClose.getType() == Conversation.TYPE_CHANNEL) {
binder.getService().getConnection(serverId).partChannel(conversationToClose.getName());
}
if (conversationToClose.getType() != Conversation.TYPE_SERVER) {
if (conversationToClose.getType() == Conversation.TYPE_CHANNEL) {
binder.getService().getConnection(server.getId()).partChannel(conversationToClose.getName());
} else {
onRemoveConversation(conversationToClose.getName());
}
else if (conversationToClose.getType() == Conversation.TYPE_QUERY) {
onRemoveConversation(conversationToClose.getName());
} else {
Toast.makeText(this, "You can not close the server info window", Toast.LENGTH_SHORT).show();
}