mirror of
https://github.com/moparisthebest/Yaaic
synced 2024-11-26 19:02:17 -05:00
Merged patch of tkn
This commit is contained in:
parent
c866d7ef3e
commit
f0aabcde8b
@ -242,15 +242,11 @@ public class ConversationActivity extends Activity implements ServiceConnection,
|
|||||||
case R.id.close:
|
case R.id.close:
|
||||||
Conversation conversationToClose = deckAdapter.getItem(deck.getSelectedItemPosition());
|
Conversation conversationToClose = deckAdapter.getItem(deck.getSelectedItemPosition());
|
||||||
// Make sure we part a channel when closing the channel conversation
|
// 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());
|
binder.getService().getConnection(serverId).partChannel(conversationToClose.getName());
|
||||||
}
|
}
|
||||||
if (conversationToClose.getType() != Conversation.TYPE_SERVER) {
|
else if (conversationToClose.getType() == Conversation.TYPE_QUERY) {
|
||||||
if (conversationToClose.getType() == Conversation.TYPE_CHANNEL) {
|
onRemoveConversation(conversationToClose.getName());
|
||||||
binder.getService().getConnection(server.getId()).partChannel(conversationToClose.getName());
|
|
||||||
} else {
|
|
||||||
onRemoveConversation(conversationToClose.getName());
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(this, "You can not close the server info window", Toast.LENGTH_SHORT).show();
|
Toast.makeText(this, "You can not close the server info window", Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user