mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
simplify Theme.fromName to silence linter warning
This commit is contained in:
parent
8156328cf6
commit
a166dc0d58
1 changed files with 1 additions and 6 deletions
|
|
@ -40,12 +40,7 @@ public enum Theme: String, CaseIterable {
|
|||
}
|
||||
|
||||
public static func fromName(themeName: String) -> Theme? {
|
||||
for theme in Theme.allCases {
|
||||
if theme.rawValue == themeName {
|
||||
return theme
|
||||
}
|
||||
}
|
||||
return nil
|
||||
Theme.allCases.first(where: { $0.rawValue == themeName })
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue