diff options
Diffstat (limited to 'data.c')
| -rw-r--r-- | data.c | 8 |
1 files changed, 4 insertions, 4 deletions
| @@ -901,11 +901,11 @@ int object_user_cache_in(snac *snac, const char *id, const char *cachedir) | |||
| 901 | } | 901 | } |
| 902 | 902 | ||
| 903 | 903 | ||
| 904 | xs_list *object_user_cache_list(snac *snac, const char *cachedir, int max) | 904 | xs_list *object_user_cache_list(snac *snac, const char *cachedir, int max, int inv) |
| 905 | /* returns the objects in a cache as a list */ | 905 | /* returns the objects in a cache as a list */ |
| 906 | { | 906 | { |
| 907 | xs *idx = xs_fmt("%s/%s.idx", snac->basedir, cachedir); | 907 | xs *idx = xs_fmt("%s/%s.idx", snac->basedir, cachedir); |
| 908 | return index_list(idx, max); | 908 | return inv ? index_list_desc(idx, 0, max) : index_list(idx, max); |
| 909 | } | 909 | } |
| 910 | 910 | ||
| 911 | 911 | ||
| @@ -945,7 +945,7 @@ int follower_check(snac *snac, const char *actor) | |||
| 945 | xs_list *follower_list(snac *snac) | 945 | xs_list *follower_list(snac *snac) |
| 946 | /* returns the list of followers */ | 946 | /* returns the list of followers */ |
| 947 | { | 947 | { |
| 948 | xs *list = object_user_cache_list(snac, "followers", XS_ALL); | 948 | xs *list = object_user_cache_list(snac, "followers", XS_ALL, 0); |
| 949 | xs_list *fwers = xs_list_new(); | 949 | xs_list *fwers = xs_list_new(); |
| 950 | char *p, *v; | 950 | char *p, *v; |
| 951 | 951 | ||
| @@ -1408,7 +1408,7 @@ int unpin(snac *user, const char *id) | |||
| 1408 | xs_list *pinned_list(snac *user) | 1408 | xs_list *pinned_list(snac *user) |
| 1409 | /* return the lists of pinned posts */ | 1409 | /* return the lists of pinned posts */ |
| 1410 | { | 1410 | { |
| 1411 | return object_user_cache_list(user, "pinned", XS_ALL); | 1411 | return object_user_cache_list(user, "pinned", XS_ALL, 1); |
| 1412 | } | 1412 | } |
| 1413 | 1413 | ||
| 1414 | 1414 | ||