Improve Icon rawValue parsing to better support multi digit values (#205)

This commit is contained in:
Joshua Halickman 2023-01-21 01:21:51 -05:00 committed by GitHub
parent 0eaf2ebc60
commit eb1925b5d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,7 +11,7 @@ struct IconSelectorView: View {
if string == Icon.primary.appIconName {
self = .primary
} else {
self = .init(rawValue: Int(String(string.last!))!)!
self = .init(rawValue: Int(String(string.replacing("AppIconAlternate", with: "")))!)!
}
}