# HG changeset patch # User Yoshiki Yazawa # Date 1217837624 -32400 # Node ID 7fb35f47a4778c40d3ef11a2f65f33e6a6211238 # Parent dfe644871483e836df8a50b25a8499042d4a5fb5 keep posted statuses in the postedlist until they certainly become useless. diff -r dfe644871483 -r 7fb35f47a477 pidgin-twitter.c --- a/pidgin-twitter.c Thu Jul 31 04:36:21 2008 +0900 +++ b/pidgin-twitter.c Mon Aug 04 17:13:44 2008 +0900 @@ -443,7 +443,7 @@ } static gboolean -is_posted_message(status_t *status) +is_posted_message(status_t *status, guint lastid) { GList *pp; gboolean rv = FALSE; @@ -452,6 +452,9 @@ status_t *posted = (status_t *)pp->data; if(posted->id == status->id) { rv = TRUE; + } + + if(posted->id <= lastid) { free_status(posted); g_free(pp->data); pp->data = NULL; @@ -511,7 +514,7 @@ for(stp = statuseslist; stp; stp=stp->next) { status_t *st = (status_t *)stp->data; - if(st->id > lastid && !is_posted_message(st)) { + if(st->id > lastid && !is_posted_message(st, lastid)) { gchar *msg = NULL; msg = g_strdup_printf("%s: %s", st->screen_name, st->text); diff -r dfe644871483 -r 7fb35f47a477 pidgin-twitter.h --- a/pidgin-twitter.h Thu Jul 31 04:36:21 2008 +0900 +++ b/pidgin-twitter.h Mon Aug 04 17:13:44 2008 +0900 @@ -222,5 +222,6 @@ static GtkWidget *prefs_get_frame(PurplePlugin *plugin); /* more prototypes */ +static gboolean is_posted_message(status_t *status, guint lastid); #endif