summaryrefslogtreecommitdiff
path: root/data.c
diff options
context:
space:
mode:
Diffstat (limited to 'data.c')
-rw-r--r--data.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/data.c b/data.c
index 480a35b..7139cdf 100644
--- a/data.c
+++ b/data.c
@@ -1532,7 +1532,23 @@ void timeline_add_mark(snac *user)
1532/* adds an "already seen" mark to the private timeline */ 1532/* adds an "already seen" mark to the private timeline */
1533{ 1533{
1534 xs *fn = xs_fmt("%s/private.idx", user->basedir); 1534 xs *fn = xs_fmt("%s/private.idx", user->basedir);
1535 index_add_md5(fn, MD5_ALREADY_SEEN_MARK); 1535 char last_entry[MD5_HEX_SIZE] = "";
1536 FILE *f;
1537
1538 /* get the last entry in the index */
1539 if ((f = fopen(fn, "r")) != NULL) {
1540 index_desc_first(f, last_entry, 0);
1541 fclose(f);
1542 }
1543
1544 /* is the last entry *not* a mark? */
1545 if (strcmp(last_entry, MD5_ALREADY_SEEN_MARK) != 0) {
1546 /* add it */
1547 index_add_md5(fn, MD5_ALREADY_SEEN_MARK);
1548
1549 /* mark as new */
1550 timeline_touch(user);
1551 }
1536} 1552}
1537 1553
1538 1554