diff options
| author | 2025-01-22 05:26:52 +0000 | |
|---|---|---|
| committer | 2025-01-22 05:26:52 +0000 | |
| commit | e34febac8cf1e91d95c24fc7d0e509cfd83ffc24 (patch) | |
| tree | 98af51d6c728ec317ba810a3562cb3ef8f0b44f3 | |
| parent | Also accept 'Update' activities for 'Application' objects. (diff) | |
| parent | When reading timeline in ascending order, return results in descending order (diff) | |
| download | penes-snac2-e34febac8cf1e91d95c24fc7d0e509cfd83ffc24.tar.gz penes-snac2-e34febac8cf1e91d95c24fc7d0e509cfd83ffc24.tar.xz penes-snac2-e34febac8cf1e91d95c24fc7d0e509cfd83ffc24.zip | |
Merge pull request 'When reading timeline in ascending order, return results in descending order' (#284) from nowster/snac2:min_id_reverse into master
Reviewed-on: https://codeberg.org/grunfink/snac2/pulls/284
| -rw-r--r-- | mastoapi.c | 5 |
1 files changed, 4 insertions, 1 deletions
| @@ -1453,7 +1453,10 @@ xs_list *mastoapi_timeline(snac *user, const xs_dict *args, const char *index_fn | |||
| 1453 | xs *st = mastoapi_status(user, msg); | 1453 | xs *st = mastoapi_status(user, msg); |
| 1454 | 1454 | ||
| 1455 | if (st != NULL) { | 1455 | if (st != NULL) { |
| 1456 | out = xs_list_append(out, st); | 1456 | if (ascending) |
| 1457 | out = xs_list_insert(out, 0, st); | ||
| 1458 | else | ||
| 1459 | out = xs_list_append(out, st); | ||
| 1457 | cnt++; | 1460 | cnt++; |
| 1458 | } | 1461 | } |
| 1459 | 1462 | ||