Mercurial > pidgin-twitter
changeset 178:7fb35f47a477
keep posted statuses in the postedlist until they certainly become useless.
author | Yoshiki Yazawa <yaz@honeyplanet.jp> |
---|---|
date | Mon, 04 Aug 2008 17:13:44 +0900 |
parents | dfe644871483 |
children | 7a3ed2b113c5 |
files | pidgin-twitter.c pidgin-twitter.h |
diffstat | 2 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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);