mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 02:18:26 +00:00
Remove unused contact kind
This commit is contained in:
@ -16,22 +16,20 @@ sealed trait ContactKind { self: Product =>
|
||||
object ContactKind {
|
||||
val all = List()
|
||||
|
||||
case object Phone extends ContactKind
|
||||
case object Mobile extends ContactKind
|
||||
case object Fax extends ContactKind
|
||||
case object Email extends ContactKind
|
||||
case object Docspell extends ContactKind
|
||||
case object Website extends ContactKind
|
||||
case object Phone extends ContactKind
|
||||
case object Mobile extends ContactKind
|
||||
case object Fax extends ContactKind
|
||||
case object Email extends ContactKind
|
||||
case object Website extends ContactKind
|
||||
|
||||
def fromString(s: String): Either[String, ContactKind] =
|
||||
s.toLowerCase match {
|
||||
case "phone" => Right(Phone)
|
||||
case "mobile" => Right(Mobile)
|
||||
case "fax" => Right(Fax)
|
||||
case "email" => Right(Email)
|
||||
case "docspell" => Right(Docspell)
|
||||
case "website" => Right(Website)
|
||||
case _ => Left(s"Not a state value: $s")
|
||||
case "phone" => Right(Phone)
|
||||
case "mobile" => Right(Mobile)
|
||||
case "fax" => Right(Fax)
|
||||
case "email" => Right(Email)
|
||||
case "website" => Right(Website)
|
||||
case _ => Left(s"Not a state value: $s")
|
||||
}
|
||||
|
||||
def unsafe(str: String): ContactKind =
|
||||
|
Reference in New Issue
Block a user