summaryrefslogtreecommitdiff
path: root/data.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2024-02-05 19:34:27 +0100
committerdefault <nobody@localhost>2024-02-05 19:34:27 +0100
commit4e35b4b865512b0616f1b9dd437ad12cf2953848 (patch)
tree194e305427675c9ac06cab23c45f7553d83a1673 /data.c
parent67fbc6816b7bf22ecf9c93e1f42700e409b3b21c (diff)
Added paging to notify_list(), and use it in the notifications page.
Diffstat (limited to 'data.c')
-rw-r--r--data.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/data.c b/data.c
index dfe1c4e..642dab4 100644
--- a/data.c
+++ b/data.c
@@ -2084,7 +2084,7 @@ xs_dict *notify_get(snac *snac, const char *id)
}
-xs_list *notify_list(snac *snac)
+xs_list *notify_list(snac *snac, int skip, int show)
/* returns a list of notification ids */
{
xs *idx = xs_fmt("%s/notify.idx", snac->basedir);
@@ -2115,7 +2115,7 @@ xs_list *notify_list(snac *snac)
pthread_mutex_unlock(&data_mutex);
}
- return index_list_desc(idx, 0, 64);
+ return index_list_desc(idx, skip, show);
}
@@ -2123,7 +2123,7 @@ int notify_new_num(snac *snac)
/* counts the number of new notifications */
{
xs *t = notify_check_time(snac, 0);
- xs *lst = notify_list(snac);
+ xs *lst = notify_list(snac, 0, XS_ALL);
int cnt = 0;
xs_list *p = lst;