mirror of
https://github.com/moparisthebest/Yaaic
synced 2025-01-10 05:08:18 -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:
|
case R.id.close:
|
||||||
Conversation conversationToClose = deckAdapter.getItem(deck.getSelectedItemPosition());
|
Conversation conversationToClose = deckAdapter.getItem(deck.getSelectedItemPosition());
|
||||||
if (conversationToClose.getType() != Conversation.TYPE_SERVER) {
|
if (conversationToClose.getType() != Conversation.TYPE_SERVER) {
|
||||||
|
if (conversationToClose.getType() == Conversation.TYPE_CHANNEL) {
|
||||||
|
binder.getService().getConnection(server.getId()).partChannel(conversationToClose.getName());
|
||||||
|
} else {
|
||||||
onRemoveConversation(conversationToClose.getName());
|
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