summaryrefslogtreecommitdiff
path: root/data.c
diff options
context:
space:
mode:
Diffstat (limited to 'data.c')
-rw-r--r--data.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/data.c b/data.c
index 6e12523..3a3d992 100644
--- a/data.c
+++ b/data.c
@@ -906,11 +906,12 @@ void timeline_admire(snac *snac, char *id, char *admirer, int like)
906} 906}
907 907
908 908
909d_char *timeline_top_level(d_char *list) 909xs_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