1
0
mirror of https://github.com/yattee/yattee.git synced 2024-12-15 14:50:32 +05:30
yattee/Model/ManifestedInstance.swift

31 lines
680 B
Swift
Raw Normal View History

import Foundation
struct ManifestedInstance: Identifiable, Hashable {
let id = UUID().uuidString
let app: VideosApp
let country: String
let region: String
let flag: String
let url: URL
var instance: Instance {
2022-12-09 05:45:19 +05:30
.init(app: app, name: "Public - \(country)", apiURLString: url.absoluteString)
}
var location: String {
"\(flag) \(country)"
}
var anonymousAccount: Account {
.init(
id: UUID().uuidString,
app: app,
name: location,
2022-12-09 05:45:19 +05:30
urlString: url.absoluteString,
anonymous: true,
country: country,
region: region
)
}
}