Skip to content

Commit

Permalink
Enum-like String for OpenCC
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleoflqj committed Dec 11, 2024
1 parent fc6dbd8 commit f501f64
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/config/option.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ func toOptionView(_ data: [String: Any], onUpdate: @escaping (Encodable) -> Void
case "Integer":
return IntegerView(data: data, onUpdate: onUpdate)
case "String":
if data["IsEnum"] as? String == "True" {
return EnumView(data: data, onUpdate: onUpdate)
}
return StringView(data: data, onUpdate: onUpdate)
case "External":
return ExternalView(data: data)
Expand Down

0 comments on commit f501f64

Please sign in to comment.