commit e34feba

grunfink  ·  2025-01-22 05:26:52 +0000 UTC
parents 070a9db, e6baf0d
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
1 files changed,  +4, -1
+4, -1
 1@@ -1453,7 +1453,10 @@ xs_list *mastoapi_timeline(snac *user, const xs_dict *args, const char *index_fn
 2             xs *st = mastoapi_status(user, msg);
 3 
 4             if (st != NULL) {
 5-                out = xs_list_append(out, st);
 6+                if (ascending)
 7+                    out = xs_list_insert(out, 0, st);
 8+                else
 9+                    out = xs_list_append(out, st);
10                 cnt++;
11             }
12