Added result to add and remove from autocomplete

This commit is contained in:
James Booth
2012-05-23 23:46:54 +01:00
parent 375d9336ef
commit cac0ea0742
5 changed files with 25 additions and 21 deletions

View File

@@ -335,11 +335,15 @@ static int _jabber_presence_handler(xmpp_conn_t * const conn,
if (strcmp(short_jid, short_from) !=0) {
if (type == NULL) {// online
win_contact_online(short_from, show_str, status_str);
contact_list_add(short_from, show_str, status_str);
gboolean result = contact_list_add(short_from, show_str, status_str);
if (result) {
win_contact_online(short_from, show_str, status_str);
}
} else {// offline
win_contact_offline(short_from, show_str, status_str);
contact_list_remove(short_from);
gboolean result = contact_list_remove(short_from);
if (result) {
win_contact_offline(short_from, show_str, status_str);
}
}
win_page_off();