1
0
mirror of https://github.com/zedeus/nitter.git synced 2025-12-08 04:55:37 -05:00

Display "more replies"

This commit is contained in:
Zed
2019-07-01 03:13:12 +02:00
parent 160c28eda3
commit a901e50df5
6 changed files with 77 additions and 33 deletions

View File

@@ -83,19 +83,21 @@ type
poll*: Option[Poll]
available*: bool
Tweets* = seq[Tweet]
Thread* = object
tweets*: seq[Tweet]
more*: int
Conversation* = ref object
tweet*: Tweet
before*: Tweets
after*: Tweets
replies*: seq[Tweets]
before*: Thread
after*: Thread
replies*: seq[Thread]
Timeline* = ref object
tweets*: Tweets
tweets*: seq[Tweet]
minId*: string
maxId*: string
hasMore*: bool
proc contains*(thread: Tweets; tweet: Tweet): bool =
thread.anyIt(it.id == tweet.id)
proc contains*(thread: Thread; tweet: Tweet): bool =
thread.tweets.anyIt(it.id == tweet.id)