# HG changeset patch # User Mikael Berthe # Date 1148197632 -7200 # Node ID a8fadbd9785839b0197a5dda58101c53e6e65bc3 # Parent cb2a3a1d985f92f3f7804fc68280dfb40bb29364 Rebuild buddylist when setting a new message flag diff -r cb2a3a1d985f -r a8fadbd97858 mcabber/src/roster.c --- a/mcabber/src/roster.c Sat May 20 19:27:45 2006 +0200 +++ b/mcabber/src/roster.c Sun May 21 09:47:12 2006 +0200 @@ -533,12 +533,14 @@ { GSList *sl_user; roster *roster_usr, *roster_grp; + int new_roster_item = FALSE; sl_user = roster_find(jid, jidsearch, ROSTER_TYPE_USER|ROSTER_TYPE_ROOM|ROSTER_TYPE_AGENT); // If we can't find it, we add it if (sl_user == NULL) { sl_user = roster_add_user(jid, NULL, NULL, ROSTER_TYPE_USER, sub_none); + new_roster_item = TRUE; } roster_usr = (roster*)sl_user->data; @@ -579,6 +581,9 @@ // Actually the "else" part is useless, because the group // ROSTER_FLAG_MSG should already be set... } + + if (buddylist && new_roster_item) + buddylist_build(); } const char *roster_getname(const char *jid)