commit e6baf0d

Paul Martin  ·  2025-01-21 23:26:50 +0000 UTC
parent 2611c81
When reading timeline in ascending order, return results in descending order
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