PiP and UI improvements

This commit is contained in:
Arkadiusz Fal
2021-10-28 19:14:55 +02:00
parent c387454d9a
commit 24f7c566bf
18 changed files with 169 additions and 55 deletions

View File

@@ -47,8 +47,12 @@ struct Instance: Defaults.Serializable, Hashable, Identifiable {
URLComponents(string: apiURL)!
}
var frontendHost: String {
URLComponents(string: frontendURL!)!.host!
var frontendHost: String? {
guard let url = app == .invidious ? apiURL : frontendURL else {
return nil
}
return URLComponents(string: url)?.host
}
func hash(into hasher: inout Hasher) {