summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
Diffstat (limited to 'html.c')
-rw-r--r--html.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/html.c b/html.c
index 3b63cfc..bd94e9f 100644
--- a/html.c
+++ b/html.c
@@ -3314,21 +3314,17 @@ int html_get_handler(const xs_dict *req, const char *q_path,
3314 } 3314 }
3315 else { 3315 else {
3316 xs *list = NULL; 3316 xs *list = NULL;
3317 xs *next = NULL; 3317 int more = 0;
3318 3318
3319 if (xs_is_true(xs_dict_get(srv_config, "strict_public_timelines"))) { 3319 if (xs_is_true(xs_dict_get(srv_config, "strict_public_timelines")))
3320 list = timeline_simple_list(&snac, "public", skip, show); 3320 list = timeline_simple_list(&snac, "public", skip, show, &more);
3321 next = timeline_simple_list(&snac, "public", skip + show, 1); 3321 else
3322 } 3322 list = timeline_list(&snac, "public", skip, show, &more);
3323 else {
3324 list = timeline_list(&snac, "public", skip, show);
3325 next = timeline_list(&snac, "public", skip + show, 1);
3326 }
3327 3323
3328 xs *pins = pinned_list(&snac); 3324 xs *pins = pinned_list(&snac);
3329 pins = xs_list_cat(pins, list); 3325 pins = xs_list_cat(pins, list);
3330 3326
3331 *body = html_timeline(&snac, pins, 1, skip, show, xs_list_len(next), NULL, "", 1, error); 3327 *body = html_timeline(&snac, pins, 1, skip, show, more, NULL, "", 1, error);
3332 3328
3333 *b_size = strlen(*body); 3329 *b_size = strlen(*body);
3334 status = HTTP_STATUS_OK; 3330 status = HTTP_STATUS_OK;
@@ -3490,13 +3486,14 @@ int html_get_handler(const xs_dict *req, const char *q_path,
3490 xs_dict_get(req, "if-none-match"), etag); 3486 xs_dict_get(req, "if-none-match"), etag);
3491 } 3487 }
3492 else { 3488 else {
3489 int more = 0;
3490
3493 snac_debug(&snac, 1, xs_fmt("building timeline")); 3491 snac_debug(&snac, 1, xs_fmt("building timeline"));
3494 3492
3495 xs *list = timeline_list(&snac, "private", skip, show); 3493 xs *list = timeline_list(&snac, "private", skip, show, &more);
3496 xs *next = timeline_list(&snac, "private", skip + show, 1);
3497 3494
3498 *body = html_timeline(&snac, list, 0, skip, show, 3495 *body = html_timeline(&snac, list, 0, skip, show,
3499 xs_list_len(next), NULL, "/admin", 1, error); 3496 more, NULL, "/admin", 1, error);
3500 3497
3501 *b_size = strlen(*body); 3498 *b_size = strlen(*body);
3502 status = HTTP_STATUS_OK; 3499 status = HTTP_STATUS_OK;
@@ -3702,7 +3699,7 @@ int html_get_handler(const xs_dict *req, const char *q_path,
3702 3699
3703 int cnt = xs_number_get(xs_dict_get_def(srv_config, "max_public_entries", "20")); 3700 int cnt = xs_number_get(xs_dict_get_def(srv_config, "max_public_entries", "20"));
3704 3701
3705 xs *elems = timeline_simple_list(&snac, "public", 0, cnt); 3702 xs *elems = timeline_simple_list(&snac, "public", 0, cnt, NULL);
3706 xs *bio = xs_dup(xs_dict_get(snac.config, "bio")); 3703 xs *bio = xs_dup(xs_dict_get(snac.config, "bio"));
3707 3704
3708 xs *rss_title = xs_fmt("%s (@%s@%s)", 3705 xs *rss_title = xs_fmt("%s (@%s@%s)",