changeset 10205:35eae887271a

[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>
author Mark Doliner <mark@kingant.net>
date Fri, 19 Nov 2004 03:21:52 +0000
parents 393f85d9f8dd
children cf991e2b63cb
files src/blist.c
diffstat 1 files changed, 13 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- 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)