From bece7b35c72de76de3e1d69baef3e1002c74c452 Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Fri, 17 Apr 2026 20:10:48 +0200 Subject: [PATCH] Add clear history menu to tvOS History view --- Yattee/Views/Home/HistoryListView.swift | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Yattee/Views/Home/HistoryListView.swift b/Yattee/Views/Home/HistoryListView.swift index 15a203d2..734537a3 100644 --- a/Yattee/Views/Home/HistoryListView.swift +++ b/Yattee/Views/Home/HistoryListView.swift @@ -93,6 +93,21 @@ struct HistoryListView: View { } label: { Label(String(localized: "viewOptions.title"), systemImage: "slider.horizontal.3") } + + if !history.isEmpty { + Menu { + ForEach(ClearHistoryOption.allCases, id: \.self) { option in + Button(role: .destructive) { + selectedClearOption = option + showingClearConfirmation = true + } label: { + Label(option.localizedTitle, systemImage: option.systemImage) + } + } + } label: { + Label(String(localized: "home.history.clear"), systemImage: "trash") + } + } } .focusSection() .padding(.horizontal, 48)