Silence some warnings
This commit is contained in:
parent
155909aa9f
commit
bde3c3662d
9 changed files with 11 additions and 12 deletions
|
@ -5,7 +5,7 @@ from parsecfg import nil
|
||||||
|
|
||||||
export genUpdatePrefs, genResetPrefs
|
export genUpdatePrefs, genResetPrefs
|
||||||
|
|
||||||
var defaultPrefs*: Prefs
|
var defaultPrefs* {.threadvar.}: Prefs
|
||||||
|
|
||||||
proc updateDefaultPrefs*(cfg: parsecfg.Config) =
|
proc updateDefaultPrefs*(cfg: parsecfg.Config) =
|
||||||
genDefaultPrefs()
|
genDefaultPrefs()
|
||||||
|
|
|
@ -62,7 +62,6 @@ proc genQueryParam*(query: Query): string =
|
||||||
if "nativeretweets" notin query.excludes:
|
if "nativeretweets" notin query.excludes:
|
||||||
param &= "include:nativeretweets "
|
param &= "include:nativeretweets "
|
||||||
|
|
||||||
let rewrite = query.fromUser.len > 0 and query.kind in {posts, media}
|
|
||||||
for f in query.filters:
|
for f in query.filters:
|
||||||
filters.add "filter:" & f
|
filters.add "filter:" & f
|
||||||
for e in query.excludes:
|
for e in query.excludes:
|
||||||
|
|
|
@ -6,7 +6,7 @@ import types, api
|
||||||
const redisNil = "\0\0"
|
const redisNil = "\0\0"
|
||||||
|
|
||||||
var
|
var
|
||||||
pool: RedisPool
|
pool {.threadvar.}: RedisPool
|
||||||
baseCacheTime = 60 * 60
|
baseCacheTime = 60 * 60
|
||||||
rssCacheTime: int
|
rssCacheTime: int
|
||||||
listCacheTime*: int
|
listCacheTime*: int
|
||||||
|
|
|
@ -103,7 +103,7 @@ proc createRssRouter*(cfg: Config) =
|
||||||
|
|
||||||
var key = @"name" & "/" & @"tab"
|
var key = @"name" & "/" & @"tab"
|
||||||
if @"tab" == "search":
|
if @"tab" == "search":
|
||||||
key &= hash(genQueryUrl(query))
|
key &= $hash(genQueryUrl(query))
|
||||||
key &= getCursor()
|
key &= getCursor()
|
||||||
|
|
||||||
var rss = await getCachedRss(key)
|
var rss = await getCachedRss(key)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import asyncdispatch, httpclient, times, sequtils, strutils
|
import asyncdispatch, httpclient, times, sequtils, strutils
|
||||||
import types
|
import types
|
||||||
|
|
||||||
var tokenPool: seq[Token]
|
var tokenPool {.threadvar.}: seq[Token]
|
||||||
|
|
||||||
proc fetchToken(): Future[Token] {.async.} =
|
proc fetchToken(): Future[Token] {.async.} =
|
||||||
let
|
let
|
||||||
|
|
|
@ -2,7 +2,7 @@ import strutils, strformat, sequtils, uri, tables, base64
|
||||||
import nimcrypto, regex
|
import nimcrypto, regex
|
||||||
|
|
||||||
var
|
var
|
||||||
hmacKey = "secretkey"
|
hmacKey {.threadvar.}: string
|
||||||
base64Media = false
|
base64Media = false
|
||||||
|
|
||||||
const
|
const
|
||||||
|
@ -51,7 +51,7 @@ proc cleanFilename*(filename: string): string =
|
||||||
result &= ".png"
|
result &= ".png"
|
||||||
|
|
||||||
proc filterParams*(params: Table): seq[(string, string)] =
|
proc filterParams*(params: Table): seq[(string, string)] =
|
||||||
let filter = ["name", "id", "list", "referer", "scroll"]
|
const filter = ["name", "id", "list", "referer", "scroll"]
|
||||||
toSeq(params.pairs()).filterIt(it[0] notin filter and it[1].len > 0)
|
toSeq(params.pairs()).filterIt(it[0] notin filter and it[1].len > 0)
|
||||||
|
|
||||||
proc isTwitterUrl*(uri: Uri): bool =
|
proc isTwitterUrl*(uri: Uri): bool =
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import tables, macros, strutils, os
|
import tables, macros, strutils
|
||||||
import karax/[karaxdsl, vdom, vstyles]
|
import karax/[karaxdsl, vdom]
|
||||||
|
|
||||||
import renderutils
|
import renderutils
|
||||||
import ../types, ../prefs_impl
|
import ../types, ../prefs_impl
|
||||||
|
|
|
@ -4,7 +4,7 @@ import karax/[karaxdsl, vdom]
|
||||||
import renderutils, timeline
|
import renderutils, timeline
|
||||||
import ".."/[types, query]
|
import ".."/[types, query]
|
||||||
|
|
||||||
let toggles = {
|
const toggles = {
|
||||||
"nativeretweets": "Retweets",
|
"nativeretweets": "Retweets",
|
||||||
"media": "Media",
|
"media": "Media",
|
||||||
"videos": "Videos",
|
"videos": "Videos",
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import strutils, strformat, sequtils, algorithm, times, uri, options
|
import strutils, strformat, sequtils, algorithm, uri, options
|
||||||
import karax/[karaxdsl, vdom, vstyles]
|
import karax/[karaxdsl, vdom]
|
||||||
|
|
||||||
import ".."/[types, query, formatters]
|
import ".."/[types, query, formatters]
|
||||||
import tweet, renderutils
|
import tweet, renderutils
|
||||||
|
|
Loading…
Reference in a new issue