Refactor and Scope user settings to pubkey

This commit is contained in:
William Casarin
2023-04-21 16:21:01 -07:00
parent 9bf8349db6
commit aa559b2916
10 changed files with 295 additions and 312 deletions

View File

@@ -7,7 +7,19 @@
import Foundation
enum TranslationService: String, CaseIterable, Identifiable {
enum TranslationService: String, CaseIterable, Identifiable, StringCodable {
init?(from string: String) {
guard let ts = TranslationService(rawValue: string) else {
return nil
}
self = ts
}
func to_string() -> String {
return self.rawValue
}
var id: String { self.rawValue }
struct Model: Identifiable, Hashable {