mirror of
https://github.com/zedeus/nitter.git
synced 2024-12-12 02:56:29 +00:00
Simplify query parameters
This commit is contained in:
parent
9e3138e51b
commit
ac9fa2ce1d
2 changed files with 4 additions and 2 deletions
|
@ -93,7 +93,7 @@ proc genQueryUrl*(query: Query): string =
|
|||
params.add "f-" & f & "=on"
|
||||
for e in query.excludes:
|
||||
params.add "e-" & e & "=on"
|
||||
for i in query.includes:
|
||||
for i in query.includes.filterIt(it != "nativeretweets"):
|
||||
params.add "i-" & i & "=on"
|
||||
|
||||
if query.since.len > 0:
|
||||
|
|
|
@ -11,8 +11,10 @@ proc getQuery(query: Query): string =
|
|||
result &= "&"
|
||||
|
||||
proc renderNewer(query: Query; path: string): VNode =
|
||||
let q = genQueryUrl(query)
|
||||
let url = if q.len > 0: "?" & q else: ""
|
||||
buildHtml(tdiv(class="timeline-item show-more")):
|
||||
a(href=(&"{path}?{genQueryUrl(query)}")):
|
||||
a(href=(path & url)):
|
||||
text "Load newest"
|
||||
|
||||
proc renderMore(query: Query; minId: string): VNode =
|
||||
|
|
Loading…
Reference in a new issue