Use method to find instance

This commit is contained in:
Arkadiusz Fal 2023-06-07 22:37:37 +02:00
parent 2c5eb18bc9
commit 71b25afa28

View File

@ -53,7 +53,7 @@ struct Account: Defaults.Serializable, Hashable, Identifiable {
} }
var instance: Instance! { var instance: Instance! {
Defaults[.instances].first { $0.id == instanceID } ?? Instance(app: app ?? .invidious, name: urlString, apiURLString: urlString) InstancesModel.shared.find(instanceID) ?? Instance(app: app ?? .invidious, name: urlString, apiURLString: urlString)
} }
var isPublic: Bool { var isPublic: Bool {