From d6be08d093bcde38286268b789395cf7a99e67ed Mon Sep 17 00:00:00 2001 From: Zed Date: Sat, 25 Nov 2023 05:53:13 +0000 Subject: [PATCH] Fix jobDetails error on old Nim versions --- src/experimental/parser/unifiedcard.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/experimental/parser/unifiedcard.nim b/src/experimental/parser/unifiedcard.nim index 4a50e48..1f7b825 100644 --- a/src/experimental/parser/unifiedcard.nim +++ b/src/experimental/parser/unifiedcard.nim @@ -31,7 +31,7 @@ proc parseMediaDetails(data: ComponentData; card: UnifiedCard; result: var Card) proc parseJobDetails(data: ComponentData; card: UnifiedCard; result: var Card) = data.destination.parseDestination(card, result) - result.kind = jobDetails + result.kind = CardKind.jobDetails result.title = data.title result.text = data.shortDescriptionText result.dest = &"@{data.profileUser.username} ยท {data.location}" @@ -93,7 +93,7 @@ proc parseUnifiedCard*(json: string): Card = component.parseMedia(card, result) of buttonGroup: discard - of jobDetails: + of ComponentType.jobDetails: component.data.parseJobDetails(card, result) of ComponentType.hidden: result.kind = CardKind.hidden