mirror of
https://github.com/zedeus/nitter
synced 2024-11-22 09:57:16 +01:00
Fix compilation with old Nim again
This commit is contained in:
parent
f8254c2f0f
commit
a9740fec8b
@ -14,7 +14,7 @@ proc parseGraphUser*(json: string): User =
|
||||
|
||||
result = raw.data.userResult.result.legacy
|
||||
result.id = raw.data.userResult.result.restId
|
||||
if result.verifiedType == none and raw.data.userResult.result.isBlueVerified:
|
||||
if result.verifiedType == VerifiedType.none and raw.data.userResult.result.isBlueVerified:
|
||||
result.verifiedType = blue
|
||||
|
||||
proc parseGraphListMembers*(json, cursor: string): Result[User] =
|
||||
|
@ -34,7 +34,7 @@ proc parseGraphUser(js: JsonNode): User =
|
||||
user = ? js{"user_results", "result"}
|
||||
result = parseUser(user{"legacy"})
|
||||
|
||||
if result.verifiedType == none and user{"is_blue_verified"}.getBool(false):
|
||||
if result.verifiedType == VerifiedType.none and user{"is_blue_verified"}.getBool(false):
|
||||
result.verifiedType = blue
|
||||
|
||||
proc parseGraphList*(js: JsonNode): List =
|
||||
|
@ -24,7 +24,7 @@ proc icon*(icon: string; text=""; title=""; class=""; href=""): VNode =
|
||||
text " " & text
|
||||
|
||||
template verifiedIcon*(user: User): untyped {.dirty.} =
|
||||
if user.verifiedType != none:
|
||||
if user.verifiedType != VerifiedType.none:
|
||||
let lower = ($user.verifiedType).toLowerAscii()
|
||||
icon "ok", class=(&"verified-icon {lower}"), title=(&"Verified {lower} account")
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user