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

@@ -89,10 +89,22 @@ extension NSMutableData {
}
}
enum MediaUploader: String, CaseIterable, Identifiable {
enum MediaUploader: String, CaseIterable, Identifiable, StringCodable {
var id: String { self.rawValue }
case nostrBuild
case nostrImg
init?(from string: String) {
guard let mu = MediaUploader(rawValue: string) else {
return nil
}
self = mu
}
func to_string() -> String {
return rawValue
}
var nameParam: String {
switch self {