chore: address linter warnings

Signed-off-by: Toni Förster <toni.foerster@gmail.com>
This commit is contained in:
Toni Förster
2024-08-18 14:46:51 +02:00
parent af75afa912
commit 94577332a1
30 changed files with 164 additions and 103 deletions

View File

@@ -61,7 +61,8 @@ final class AppleAVPlayerViewController: UIViewController {
_ sections: [NowPlayingView.ViewSection],
title: String
) -> UIHostingController<AnyView> {
let controller = UIHostingController(rootView:
let controller = UIHostingController(
rootView:
AnyView(
NowPlayingView(sections: sections, inInfoViewController: true)
.frame(maxHeight: 600)

View File

@@ -33,7 +33,7 @@ struct TimelineView: View {
@State private var dragOffset: Double = 0
@State private var draggedFrom: Double = 0
private var start: Double = 0.0
private var start = 0.0
private var height = 8.0
var cornerRadius: Double

View File

@@ -90,8 +90,9 @@ final class PlayerViewController: UIViewController {
_ sections: [NowPlayingView.ViewSection],
title: String
) -> UIHostingController<AnyView> {
let controller = UIHostingController(rootView:
AnyView(
let controller = UIHostingController(
rootView:
AnyView(
NowPlayingView(sections: sections, inInfoViewController: true)
.frame(maxHeight: 600)
.environmentObject(commentsModel)

View File

@@ -208,6 +208,7 @@ struct VideoDetails: View {
.frame(maxWidth: .infinity, alignment: .leading)
.contentShape(Rectangle())
.padding(.horizontal, 16)
// swiftlint:disable trailing_closure
#if !os(tvOS)
.tapRecognizer(
tapSensitivity: 0.2,
@@ -218,6 +219,7 @@ struct VideoDetails: View {
}
)
#endif
// swiftlint:enable trailing_closure
VideoActions(video: player.videoForDisplay)
.padding(.vertical, 5)

View File

@@ -281,7 +281,7 @@ struct VideoPlayerView: View {
}
.gesture(player.controls.presentingOverlays ? nil : playerDragGesture)
#if os(macOS)
.onAppear(perform: {
.onAppear {
NSEvent.addLocalMonitorForEvents(matching: [.mouseMoved]) {
hoverThrottle.execute {
if !player.currentItem.isNil, hoveringPlayer {
@@ -291,7 +291,7 @@ struct VideoPlayerView: View {
return $0
}
})
}
#endif
.background(Color.black)