# HG changeset patch
# User Mark Doliner <mark@kingant.net>
# Date 1100834512 0
# Node ID 35eae887271a36b5105952b9a45d20074df91907
# Parent  393f85d9f8dd96281a3164e0b2495e826ecd477a
[gaim-migrate @ 11326]
I removed the did_something thingy.  My comment in the code might explain
why.  Basically, if someone changes their available message then the
change will show up immediately instead of whenever something else happens
to trigger a blist update for that person.

Rockin' in the Wheary Land.

committer: Tailor Script <tailor@pidgin.im>

diff -r 393f85d9f8dd -r 35eae887271a src/blist.c
--- a/src/blist.c	Fri Nov 19 03:08:27 2004 +0000
+++ b/src/blist.c	Fri Nov 19 03:21:52 2004 +0000
@@ -279,7 +279,6 @@
 	GaimBlistUiOps *ops = gaimbuddylist->ui_ops;
 	GaimPresence *presence;
 	GaimStatus *status;
-	gboolean did_something = FALSE;
 
 	g_return_if_fail(buddy != NULL);
 
@@ -301,7 +300,6 @@
 		if (buddy->timer > 0)
 			gaim_timeout_remove(buddy->timer);
 		buddy->timer = gaim_timeout_add(10000, (GSourceFunc)presence_update_timeout_cb, buddy);
-		did_something = TRUE;
 
 	} else if (!gaim_status_is_online(status) &&
 				gaim_status_is_online(old_status)) {
@@ -310,25 +308,30 @@
 		if (buddy->timer > 0)
 			gaim_timeout_remove(buddy->timer);
 		buddy->timer = gaim_timeout_add(10000, (GSourceFunc)presence_update_timeout_cb, buddy);
-		did_something = TRUE;
 
 	} else if (gaim_status_is_available(status) &&
 			   !gaim_status_is_available(old_status)) {
 		gaim_signal_emit(gaim_blist_get_handle(), "buddy-back", buddy);
-		did_something = TRUE;
 
 	} else if (!gaim_status_is_available(status) &&
 			   gaim_status_is_available(old_status)) {
 		gaim_signal_emit(gaim_blist_get_handle(), "buddy-away", buddy);
-		did_something = TRUE;
 
 	}
 
-	if (did_something) {
-		gaim_contact_compute_priority_buddy(gaim_buddy_get_contact(buddy));
-		if (ops && ops->update)
-			ops->update(gaimbuddylist, (GaimBlistNode *)buddy);
-	}
+	/*
+	 * This function used to only call the following two functions if one of
+	 * the above signals had been triggered, but that's not good, because
+	 * if someone's away message changes and they don't go from away to back
+	 * to away then no signal is triggered.
+	 *
+	 * It's a safe assumption that SOMETHING called this function.  PROBABLY
+	 * because something, somewhere changed.  Calling the stuff below
+	 * certainly won't hurt anything.  Unless you're on a K6-2 300.
+	 */
+	gaim_contact_compute_priority_buddy(gaim_buddy_get_contact(buddy));
+	if (ops && ops->update)
+		ops->update(gaimbuddylist, (GaimBlistNode *)buddy);
 }
 
 void gaim_blist_update_buddy_signon(GaimBuddy *buddy, time_t signon)