mirror of
https://github.com/yattee/yattee.git
synced 2025-12-25 14:10:14 +00:00
Fix setting account
This commit is contained in:
@@ -4,6 +4,7 @@ import Foundation
|
||||
struct Instance: Defaults.Serializable, Hashable, Identifiable {
|
||||
struct Account: Defaults.Serializable, Hashable, Identifiable {
|
||||
static var bridge = AccountsBridge()
|
||||
static var empty = Account(instanceID: UUID(), name: "Signed Out", url: "", sid: "")
|
||||
|
||||
let id: UUID
|
||||
let instanceID: UUID
|
||||
@@ -36,6 +37,10 @@ struct Instance: Defaults.Serializable, Hashable, Identifiable {
|
||||
(name != nil && name!.isEmpty) ? "Unnamed (\(anonymizedSID))" : name!
|
||||
}
|
||||
|
||||
var isEmpty: Bool {
|
||||
self == Account.empty
|
||||
}
|
||||
|
||||
func hash(into hasher: inout Hasher) {
|
||||
hasher.combine(sid)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user