1
0
mirror of https://github.com/moparisthebest/Yaaic synced 2024-12-25 00:48:50 -05:00

Also update query if a user exists

This commit is contained in:
Sebastian Kaspari 2010-03-14 01:06:06 +01:00
parent 63fa7910d0
commit 2d585d6a72

View File

@ -487,6 +487,22 @@ public class IRCConnection extends PircBot
intent.putExtra(Broadcast.EXTRA_CONVERSATION, target); intent.putExtra(Broadcast.EXTRA_CONVERSATION, target);
service.sendBroadcast(intent); service.sendBroadcast(intent);
} }
// Look if there's a query to update
Conversation conversation = server.getConversation(sourceNick);
if (conversation != null) {
Message message = new Message(sourceNick + " quitted (" + reason + ")");
message.setColor(Message.COLOR_GREEN);
message.setIcon(R.drawable.quit);
conversation.addMessage(message);
Intent intent = new Intent(Broadcast.CONVERSATION_MESSAGE);
intent.putExtra(Broadcast.EXTRA_SERVER, server.getId());
intent.putExtra(Broadcast.EXTRA_CONVERSATION, conversation.getName());
service.sendBroadcast(intent);
}
} else { } else {
// XXX: We quitted // XXX: We quitted
} }