comparison libpurple/blist.c @ 16510:f1513338fbdb

A patch from khc in ticket #87 "... because the contact priority is not always invalidated when the blist is updated. I removed the ui update in notify_buddy_status_update() because it doesn't recompute the priority and because the only call path for that function already updates the blist"
author Richard Laager <rlaager@wiktel.com>
date Fri, 27 Apr 2007 05:15:59 +0000
parents 5e47b3427b28
children f9c369b4291c
comparison
equal deleted inserted replaced
16502:c01528418cc2 16510:f1513338fbdb
2332 continue; 2332 continue;
2333 2333
2334 buddy = (PurpleBuddy *)bnode; 2334 buddy = (PurpleBuddy *)bnode;
2335 if (account == buddy->account) { 2335 if (account == buddy->account) {
2336 PurplePresence *presence; 2336 PurplePresence *presence;
2337 recompute = TRUE;
2338 2337
2339 presence = purple_buddy_get_presence(buddy); 2338 presence = purple_buddy_get_presence(buddy);
2340 2339
2341 if(purple_presence_is_online(presence)) { 2340 if(purple_presence_is_online(presence)) {
2342 contact->online--; 2341 contact->online--;
2352 group->currentsize--; 2351 group->currentsize--;
2353 2352
2354 if (!g_list_find(list, presence)) 2353 if (!g_list_find(list, presence))
2355 list = g_list_prepend(list, presence); 2354 list = g_list_prepend(list, presence);
2356 2355
2357 if (ops && ops->remove) 2356 if (contact->priority == buddy)
2357 purple_contact_invalidate_priority_buddy(contact);
2358 else
2359 recompute = TRUE;
2360
2361 if (ops && ops->remove) {
2358 ops->remove(purplebuddylist, bnode); 2362 ops->remove(purplebuddylist, bnode);
2363 }
2359 } 2364 }
2360 } 2365 }
2361 if (recompute) { 2366 if (recompute) {
2362 purple_contact_invalidate_priority_buddy(contact); 2367 purple_contact_invalidate_priority_buddy(contact);
2363 if (ops && ops->update) 2368 if (ops && ops->update)