diff options
| author | 2024-02-05 19:34:27 +0100 | |
|---|---|---|
| committer | 2024-02-05 19:34:27 +0100 | |
| commit | 4e35b4b865512b0616f1b9dd437ad12cf2953848 (patch) | |
| tree | 194e305427675c9ac06cab23c45f7553d83a1673 /html.c | |
| parent | Bumped version. (diff) | |
| download | snac2-4e35b4b865512b0616f1b9dd437ad12cf2953848.tar.gz snac2-4e35b4b865512b0616f1b9dd437ad12cf2953848.tar.xz snac2-4e35b4b865512b0616f1b9dd437ad12cf2953848.zip | |
Added paging to notify_list(), and use it in the notifications page.
Diffstat (limited to 'html.c')
| -rw-r--r-- | html.c | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -2135,9 +2135,9 @@ xs_str *html_people(snac *user) | |||
| 2135 | } | 2135 | } |
| 2136 | 2136 | ||
| 2137 | 2137 | ||
| 2138 | xs_str *html_notifications(snac *user) | 2138 | xs_str *html_notifications(snac *user, int skip, int show) |
| 2139 | { | 2139 | { |
| 2140 | xs *n_list = notify_list(user); | 2140 | xs *n_list = notify_list(user, skip, show); |
| 2141 | xs *n_time = notify_check_time(user, 0); | 2141 | xs *n_time = notify_check_time(user, 0); |
| 2142 | 2142 | ||
| 2143 | xs_html *body = html_user_body(user, 0); | 2143 | xs_html *body = html_user_body(user, 0); |
| @@ -2428,7 +2428,7 @@ int html_get_handler(const xs_dict *req, const char *q_path, | |||
| 2428 | status = 401; | 2428 | status = 401; |
| 2429 | } | 2429 | } |
| 2430 | else { | 2430 | else { |
| 2431 | *body = html_notifications(&snac); | 2431 | *body = html_notifications(&snac, skip, show); |
| 2432 | *b_size = strlen(*body); | 2432 | *b_size = strlen(*body); |
| 2433 | status = 200; | 2433 | status = 200; |
| 2434 | } | 2434 | } |