Update Model/Applications/VideosAPI.swift

This commit is contained in:
Arkadiusz Fal 2024-05-16 18:25:08 +02:00 committed by GitHub
parent 1f667818db
commit 4038f7fdb9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -108,10 +108,10 @@ extension VideosAPI {
.onFailure { failureHandler?($0) } .onFailure { failureHandler?($0) }
} }
func shareURL(_ item: ContentItem, frontendURL: String? = nil, time: CMTime? = nil) -> URL? { func shareURL(_ item: ContentItem, frontendURLString: String? = nil, time: CMTime? = nil) -> URL? {
var urlComponents: URLComponents? var urlComponents: URLComponents?
if let frontendURLString: String = frontendURL, if let frontendURLString,
let frontendURL: URL = URL(string: frontendURLString) { let frontendURL = URL(string: frontendURLString) {
urlComponents = URLComponents(URL: frontendURL, resolvingAgainstBaseURL: false) urlComponents = URLComponents(URL: frontendURL, resolvingAgainstBaseURL: false)
} else if let instanceComponents = account?.instance?.urlComponents { } else if let instanceComponents = account?.instance?.urlComponents {
urlComponents = instanceComponents urlComponents = instanceComponents