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:
parent
c20de9fbd2
commit
f5294f2d86
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user