From a9740fec8b2d9d4469322cc66d3f3547e0b6ccdb Mon Sep 17 00:00:00 2001 From: Zed Date: Sat, 25 Nov 2023 10:11:57 +0000 Subject: [PATCH] Fix compilation with old Nim again --- src/experimental/parser/graphql.nim | 2 +- src/parser.nim | 2 +- src/views/renderutils.nim | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/experimental/parser/graphql.nim b/src/experimental/parser/graphql.nim index c7f115f..69837ab 100644 --- a/src/experimental/parser/graphql.nim +++ b/src/experimental/parser/graphql.nim @@ -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] = diff --git a/src/parser.nim b/src/parser.nim index a7bf89d..f2547e4 100644 --- a/src/parser.nim +++ b/src/parser.nim @@ -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 = diff --git a/src/views/renderutils.nim b/src/views/renderutils.nim index 451ddfb..f298fad 100644 --- a/src/views/renderutils.nim +++ b/src/views/renderutils.nim @@ -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: