src/blist.c

changeset 12305
6989da147d02
parent 12112
86a24bbf9a2c
child 12319
42a0e8cecea3
--- a/src/blist.c	Sat Dec 03 18:07:39 2005 +0000
+++ b/src/blist.c	Sat Dec 03 18:35:37 2005 +0000
@@ -2235,6 +2235,7 @@
 	GaimChat *chat;
 	GaimContact *contact;
 	GaimGroup *group;
+	GList *list = NULL, *iter = NULL;
 
 	g_return_if_fail(gaimbuddylist != NULL);
 
@@ -2273,7 +2274,8 @@
 						if (contact->currentsize == 0)
 							group->currentsize--;
 
-						gaim_presence_set_status_active(presence, "offline", TRUE);
+						if (!g_list_find(list, presence))
+							list = g_list_prepend(list, presence);
 
 						if (ops && ops->remove)
 							ops->remove(gaimbuddylist, bnode);
@@ -2297,6 +2299,12 @@
 			}
 		}
 	}
+
+	for (iter = list; iter; iter = iter->next)
+	{
+		gaim_presence_set_status_active(iter->data, "offline", TRUE);
+	}
+	g_list_free(list);
 }
 
 gboolean gaim_group_on_account(GaimGroup *g, GaimAccount *account)

mercurial