Simplify query parameters
This commit is contained in:
parent
9e3138e51b
commit
ac9fa2ce1d
|
@ -93,7 +93,7 @@ proc genQueryUrl*(query: Query): string =
|
||||||
params.add "f-" & f & "=on"
|
params.add "f-" & f & "=on"
|
||||||
for e in query.excludes:
|
for e in query.excludes:
|
||||||
params.add "e-" & e & "=on"
|
params.add "e-" & e & "=on"
|
||||||
for i in query.includes:
|
for i in query.includes.filterIt(it != "nativeretweets"):
|
||||||
params.add "i-" & i & "=on"
|
params.add "i-" & i & "=on"
|
||||||
|
|
||||||
if query.since.len > 0:
|
if query.since.len > 0:
|
||||||
|
|
|
@ -11,8 +11,10 @@ proc getQuery(query: Query): string =
|
||||||
result &= "&"
|
result &= "&"
|
||||||
|
|
||||||
proc renderNewer(query: Query; path: string): VNode =
|
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")):
|
buildHtml(tdiv(class="timeline-item show-more")):
|
||||||
a(href=(&"{path}?{genQueryUrl(query)}")):
|
a(href=(path & url)):
|
||||||
text "Load newest"
|
text "Load newest"
|
||||||
|
|
||||||
proc renderMore(query: Query; minId: string): VNode =
|
proc renderMore(query: Query; minId: string): VNode =
|
||||||
|
|
Loading…
Reference in New Issue