Fix list pagination
This commit is contained in:
parent
43a2bd529c
commit
7cb1986a8f
1 changed files with 7 additions and 2 deletions
|
@ -27,8 +27,13 @@ proc getListTimeline*(username, list, agent, after: string): Future[Timeline] {.
|
||||||
|
|
||||||
let json = await fetchJson(url ? params, headers)
|
let json = await fetchJson(url ? params, headers)
|
||||||
result = await finishTimeline(json, Query(), after, agent)
|
result = await finishTimeline(json, Query(), after, agent)
|
||||||
if result.content.len > 0:
|
if result.content.len == 0:
|
||||||
result.minId = result.content[^1].id
|
return
|
||||||
|
|
||||||
|
let last = result.content[^1]
|
||||||
|
result.minId =
|
||||||
|
if last.retweet.isNone: last.id
|
||||||
|
else: get(last.retweet).id
|
||||||
|
|
||||||
proc getListMembers*(username, list, agent: string): Future[Result[Profile]] {.async.} =
|
proc getListMembers*(username, list, agent: string): Future[Result[Profile]] {.async.} =
|
||||||
let url = base / (listMembersUrl % [username, list])
|
let url = base / (listMembersUrl % [username, list])
|
||||||
|
|
Loading…
Reference in a new issue