Silence Sendable warnings in TVRemoteHoldSeekOverlay

Annotate makeCoordinator/makeUIView/updateUIView as @MainActor so reading
the @MainActor-typed onTick closure stays within MainActor isolation and
no longer triggers a Sendable conversion warning.
This commit is contained in:
Arkadiusz Fal
2026-05-10 15:21:14 +02:00
parent dac81e1ee8
commit aa5e78a244

View File

@@ -26,10 +26,12 @@ struct TVRemoteHoldSeekOverlay: UIViewRepresentable {
let isActive: Bool
let onTick: TVRemoteHoldSeekTick
@MainActor
func makeCoordinator() -> Coordinator {
Coordinator(onTick: onTick)
}
@MainActor
func makeUIView(context: Context) -> UIView {
let view = TVRemoteHoldSeekHostView()
view.backgroundColor = .clear
@@ -38,6 +40,7 @@ struct TVRemoteHoldSeekOverlay: UIViewRepresentable {
return view
}
@MainActor
func updateUIView(_: UIView, context: Context) {
context.coordinator.update(onTick: onTick, isActive: isActive)
}