From b85243852a4e57500bff904f28141b1432c07c56 Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Fri, 16 Oct 2026 23:58:54 +0200 Subject: [PATCH] Give tvOS Opened Links a focusable Done while no video has resolved The batch buttons are disabled until a video resolves, and loading or failed rows are not focusable, so with every link still loading or failed the remote was stuck. --- Yattee/Views/Home/OpenedLinksView.swift | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Yattee/Views/Home/OpenedLinksView.swift b/Yattee/Views/Home/OpenedLinksView.swift index bc808e49..be2e025c 100644 --- a/Yattee/Views/Home/OpenedLinksView.swift +++ b/Yattee/Views/Home/OpenedLinksView.swift @@ -11,6 +11,9 @@ import SwiftUI struct OpenedLinksView: View { @Environment(\.appEnvironment) private var appEnvironment + #if os(tvOS) + @Environment(\.dismiss) private var dismiss + #endif @AppStorage("searchRowStyle") private var rowStyle: VideoRowStyle = .regular @State private var viewModel: OpenedLinksViewModel @@ -68,6 +71,16 @@ struct OpenedLinksView: View { VStack(alignment: .leading, spacing: 24) { HStack(spacing: 24) { batchActions + + // The batch buttons stay disabled until a video resolves, + // and loading or failed rows are not focusable: with every + // link still loading or failed, this is the only thing the + // remote can land on. + if viewModel.videos.isEmpty { + Button(String(localized: "common.done")) { + dismiss() + } + } } .padding(.horizontal, 48)