Fix compilation with old Nim again
This commit is contained in:
parent
f8254c2f0f
commit
a9740fec8b
3 changed files with 3 additions and 3 deletions
|
@ -14,7 +14,7 @@ proc parseGraphUser*(json: string): User =
|
||||||
|
|
||||||
result = raw.data.userResult.result.legacy
|
result = raw.data.userResult.result.legacy
|
||||||
result.id = raw.data.userResult.result.restId
|
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
|
result.verifiedType = blue
|
||||||
|
|
||||||
proc parseGraphListMembers*(json, cursor: string): Result[User] =
|
proc parseGraphListMembers*(json, cursor: string): Result[User] =
|
||||||
|
|
|
@ -34,7 +34,7 @@ proc parseGraphUser(js: JsonNode): User =
|
||||||
user = ? js{"user_results", "result"}
|
user = ? js{"user_results", "result"}
|
||||||
result = parseUser(user{"legacy"})
|
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
|
result.verifiedType = blue
|
||||||
|
|
||||||
proc parseGraphList*(js: JsonNode): List =
|
proc parseGraphList*(js: JsonNode): List =
|
||||||
|
|
|
@ -24,7 +24,7 @@ proc icon*(icon: string; text=""; title=""; class=""; href=""): VNode =
|
||||||
text " " & text
|
text " " & text
|
||||||
|
|
||||||
template verifiedIcon*(user: User): untyped {.dirty.} =
|
template verifiedIcon*(user: User): untyped {.dirty.} =
|
||||||
if user.verifiedType != none:
|
if user.verifiedType != VerifiedType.none:
|
||||||
let lower = ($user.verifiedType).toLowerAscii()
|
let lower = ($user.verifiedType).toLowerAscii()
|
||||||
icon "ok", class=(&"verified-icon {lower}"), title=(&"Verified {lower} account")
|
icon "ok", class=(&"verified-icon {lower}"), title=(&"Verified {lower} account")
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue