Compare commits

..

No commits in common. "e9c69c8eac82090c18f398eec29620b4e086ccbd" and "8adfb562742b30ad1e8cf786d59ed5cbdf260625" have entirely different histories.

View File

@ -136,7 +136,7 @@ WHERE "channel_id" = $1
qb.WriteString(` AND "published_at" < $2`)
}
}
qb.WriteString(` ORDER BY "published_at" DESC LIMIT 20`)
qb.WriteString(` ORDER BY "published_at" DESC LIMIT 10`)
rows, err := conn.QueryContext(context.Background(), qb.String(), args...)
if err != nil {
@ -180,7 +180,8 @@ WHERE "channel_id" = $1
return tl, err
}
if len(tl.Items) > 0 && hasMoreBefore(conn, tl.Items[0].Published) {
// TODO: should only be set of there are more items available
if hasMoreBefore(conn, tl.Items[0].Published) {
tl.Paging.Before = tl.Items[0].Published
}
if hasMoreAfter(conn, last) {