diff options
| author | 2023-02-08 13:21:44 +0100 | |
|---|---|---|
| committer | 2023-02-08 13:21:44 +0100 | |
| commit | 3fcc139d6651a7d1c4fb431b3a9ee17cac897b27 (patch) | |
| tree | 030ca35b044d5848dc18814c60dbd03a6fb6626d /data.c | |
| parent | New function timeline_fn_by_md5(). (diff) | |
| download | snac2-3fcc139d6651a7d1c4fb431b3a9ee17cac897b27.tar.gz snac2-3fcc139d6651a7d1c4fb431b3a9ee17cac897b27.tar.xz snac2-3fcc139d6651a7d1c4fb431b3a9ee17cac897b27.zip | |
timeline_top_level() now looks for the entries in the user caches.
Diffstat (limited to 'data.c')
| -rw-r--r-- | data.c | 13 |
1 files changed, 8 insertions, 5 deletions
| @@ -906,11 +906,12 @@ void timeline_admire(snac *snac, char *id, char *admirer, int like) | |||
| 906 | } | 906 | } |
| 907 | 907 | ||
| 908 | 908 | ||
| 909 | d_char *timeline_top_level(d_char *list) | 909 | xs_list *timeline_top_level(snac *snac, xs_list *list) |
| 910 | /* returns the top level md5 entries from this index */ | 910 | /* returns the top level md5 entries from this index */ |
| 911 | { | 911 | { |
| 912 | xs_set seen; | 912 | xs_set seen; |
| 913 | char *p, *v; | 913 | xs_list *p; |
| 914 | xs_str *v; | ||
| 914 | 915 | ||
| 915 | xs_set_init(&seen); | 916 | xs_set_init(&seen); |
| 916 | 917 | ||
| @@ -927,8 +928,10 @@ d_char *timeline_top_level(d_char *list) | |||
| 927 | if (!object_parent(line, line2, sizeof(line2))) | 928 | if (!object_parent(line, line2, sizeof(line2))) |
| 928 | break; | 929 | break; |
| 929 | 930 | ||
| 930 | /* well, there is a parent... but if it's not there, use this */ | 931 | /* well, there is a parent... but is it here? */ |
| 931 | if (!object_here_by_md5(line2)) | 932 | xs *pfn = timeline_fn_by_md5(snac, line2); |
| 933 | |||
| 934 | if (pfn == NULL) | ||
| 932 | break; | 935 | break; |
| 933 | 936 | ||
| 934 | /* it's here! try again with its own parent */ | 937 | /* it's here! try again with its own parent */ |
| @@ -965,7 +968,7 @@ d_char *timeline_list(snac *snac, const char *idx_name, int skip, int show) | |||
| 965 | { | 968 | { |
| 966 | xs *list = timeline_simple_list(snac, idx_name, skip, show); | 969 | xs *list = timeline_simple_list(snac, idx_name, skip, show); |
| 967 | 970 | ||
| 968 | return timeline_top_level(list); | 971 | return timeline_top_level(snac, list); |
| 969 | } | 972 | } |
| 970 | 973 | ||
| 971 | 974 | ||