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