Skip to content

Commit

Permalink
Fix compilation with old Nim again
Browse files Browse the repository at this point in the history
  • Loading branch information
zedeus committed Nov 25, 2023
1 parent f8254c2 commit a9740fe
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/experimental/parser/graphql.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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] =
Expand Down
2 changes: 1 addition & 1 deletion src/parser.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
2 changes: 1 addition & 1 deletion src/views/renderutils.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit a9740fe

Please sign in to comment.