mirror of
https://github.com/yattee/yattee.git
synced 2024-12-14 14:20:32 +05:30
Fix offenses
This commit is contained in:
parent
7b4d00421a
commit
f55c3d71f2
@ -80,16 +80,18 @@ extension VideosAPI {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
video(item.videoID).load().onSuccess { response in
|
video(item.videoID).load()
|
||||||
guard let video: Video = response.typedContent() else {
|
.onSuccess { response in
|
||||||
return
|
guard let video: Video = response.typedContent() else {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
var newItem = item
|
||||||
|
newItem.video = video
|
||||||
|
|
||||||
|
completionHandler(newItem)
|
||||||
}
|
}
|
||||||
|
.onFailure { failureHandler?($0) }
|
||||||
var newItem = item
|
|
||||||
newItem.video = video
|
|
||||||
|
|
||||||
completionHandler(newItem)
|
|
||||||
}.onFailure { failureHandler?($0) }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func shareURL(_ item: ContentItem, frontendHost: String? = nil, time: CMTime? = nil) -> URL? {
|
func shareURL(_ item: ContentItem, frontendHost: String? = nil, time: CMTime? = nil) -> URL? {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
|
||||||
class SettingsModel: ObservableObject {
|
final class SettingsModel: ObservableObject {
|
||||||
@Published var presentingAlert = false
|
@Published var presentingAlert = false
|
||||||
@Published var alert = Alert(title: Text("Error"))
|
@Published var alert = Alert(title: Text("Error"))
|
||||||
|
|
||||||
|
@ -136,7 +136,7 @@ struct ControlsOverlay: View {
|
|||||||
captionsPicker
|
captionsPicker
|
||||||
.labelsHidden()
|
.labelsHidden()
|
||||||
.frame(maxWidth: 300)
|
.frame(maxWidth: 300)
|
||||||
#else
|
#elseif os(iOS)
|
||||||
Menu {
|
Menu {
|
||||||
captionsPicker
|
captionsPicker
|
||||||
.frame(width: 140, height: 30)
|
.frame(width: 140, height: 30)
|
||||||
|
@ -96,7 +96,8 @@ struct LocationsSettings: View {
|
|||||||
if let instances: [ManifestedInstance] = response.typedContent() {
|
if let instances: [ManifestedInstance] = response.typedContent() {
|
||||||
self.countries = instances.map(\.country).unique().sorted()
|
self.countries = instances.map(\.country).unique().sorted()
|
||||||
}
|
}
|
||||||
}.onFailure { _ in
|
}
|
||||||
|
.onFailure { _ in
|
||||||
model.presentAlert(title: "Could not load locations manifest")
|
model.presentAlert(title: "Could not load locations manifest")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user