From 1fa6d7a4a502cecf3af0ca82df6f62427f1f355d Mon Sep 17 00:00:00 2001 From: Arkadiusz Fal Date: Sat, 14 Feb 2026 16:24:11 +0100 Subject: [PATCH] Remove duplicate navigation titles on tvOS The sidebarAdaptable TabView already shows tab names in the sidebar pill, so the large .navigationTitle() was redundant on tvOS. --- Yattee/Views/Home/BookmarksListView.swift | 2 +- Yattee/Views/Home/HistoryListView.swift | 2 +- Yattee/Views/Home/HomeView.swift | 2 +- Yattee/Views/MediaBrowser/MediaSourcesView.swift | 2 +- Yattee/Views/Search/SearchView.swift | 2 +- Yattee/Views/Settings/SettingsView.swift | 2 ++ Yattee/Views/Subscriptions/ManageChannelsView.swift | 2 +- Yattee/Views/Subscriptions/SubscriptionsView.swift | 2 +- 8 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Yattee/Views/Home/BookmarksListView.swift b/Yattee/Views/Home/BookmarksListView.swift index 7feed46e..997d9545 100644 --- a/Yattee/Views/Home/BookmarksListView.swift +++ b/Yattee/Views/Home/BookmarksListView.swift @@ -137,8 +137,8 @@ struct BookmarksListView: View { } #endif } - .navigationTitle(String(localized: "home.bookmarks.title")) #if !os(tvOS) + .navigationTitle(String(localized: "home.bookmarks.title")) .toolbarTitleDisplayMode(.inlineLarge) .searchable(text: $searchText, prompt: Text(String(localized: "bookmarks.search.placeholder"))) .toolbar { diff --git a/Yattee/Views/Home/HistoryListView.swift b/Yattee/Views/Home/HistoryListView.swift index 6c25639f..dedc76e1 100644 --- a/Yattee/Views/Home/HistoryListView.swift +++ b/Yattee/Views/Home/HistoryListView.swift @@ -136,8 +136,8 @@ struct HistoryListView: View { } #endif } - .navigationTitle(String(localized: "home.history.title")) #if !os(tvOS) + .navigationTitle(String(localized: "home.history.title")) .toolbarTitleDisplayMode(.inlineLarge) .searchable(text: $searchText, prompt: Text(String(localized: "history.search.placeholder"))) .toolbar { diff --git a/Yattee/Views/Home/HomeView.swift b/Yattee/Views/Home/HomeView.swift index 767ab242..4defc2fa 100644 --- a/Yattee/Views/Home/HomeView.swift +++ b/Yattee/Views/Home/HomeView.swift @@ -62,13 +62,13 @@ struct HomeView: View { var body: some View { mainContent + #if !os(tvOS) .navigationTitle(String(localized: "tabs.home")) .navigationSubtitleIfAvailable( settingsManager?.incognitoModeEnabled == true ? String(localized: "home.incognitoMode.subtitle") : nil ) - #if !os(tvOS) .toolbarTitleDisplayMode(.inlineLarge) #endif .toolbar { diff --git a/Yattee/Views/MediaBrowser/MediaSourcesView.swift b/Yattee/Views/MediaBrowser/MediaSourcesView.swift index 28fb446f..5604f7b8 100644 --- a/Yattee/Views/MediaBrowser/MediaSourcesView.swift +++ b/Yattee/Views/MediaBrowser/MediaSourcesView.swift @@ -53,8 +53,8 @@ struct MediaSourcesView: View { sourcesList } } - .navigationTitle(String(localized: "sources.title")) #if !os(tvOS) + .navigationTitle(String(localized: "sources.title")) .toolbarTitleDisplayMode(.inlineLarge) .toolbar { ToolbarItem(placement: .primaryAction) { diff --git a/Yattee/Views/Search/SearchView.swift b/Yattee/Views/Search/SearchView.swift index 6e5b3243..82f48fbd 100644 --- a/Yattee/Views/Search/SearchView.swift +++ b/Yattee/Views/Search/SearchView.swift @@ -127,8 +127,8 @@ struct SearchView: View { .frame(maxWidth: .infinity, maxHeight: .infinity) } } - .navigationTitle(String(localized: "tabs.search")) #if !os(tvOS) + .navigationTitle(String(localized: "tabs.search")) .toolbarTitleDisplayMode(.inlineLarge) #endif .toolbar { diff --git a/Yattee/Views/Settings/SettingsView.swift b/Yattee/Views/Settings/SettingsView.swift index 836b792b..483176b6 100644 --- a/Yattee/Views/Settings/SettingsView.swift +++ b/Yattee/Views/Settings/SettingsView.swift @@ -206,7 +206,9 @@ struct SettingsView: View { } } } + #if !os(tvOS) .navigationTitle(String(localized: "settings.title")) + #endif #if os(iOS) .navigationBarTitleDisplayMode(.inline) #endif diff --git a/Yattee/Views/Subscriptions/ManageChannelsView.swift b/Yattee/Views/Subscriptions/ManageChannelsView.swift index 7cb151fa..53a23e7f 100644 --- a/Yattee/Views/Subscriptions/ManageChannelsView.swift +++ b/Yattee/Views/Subscriptions/ManageChannelsView.swift @@ -99,8 +99,8 @@ struct ManageChannelsView: View { viewWidth = newWidth } } - .navigationTitle(String(localized: "subscriptions.channels.title")) #if !os(tvOS) + .navigationTitle(String(localized: "subscriptions.channels.title")) .toolbarTitleDisplayMode(.inlineLarge) .searchable(text: $searchText, prompt: Text(String(localized: "channels.search.placeholder"))) .toolbar { diff --git a/Yattee/Views/Subscriptions/SubscriptionsView.swift b/Yattee/Views/Subscriptions/SubscriptionsView.swift index 68c80e3a..542aa79c 100644 --- a/Yattee/Views/Subscriptions/SubscriptionsView.swift +++ b/Yattee/Views/Subscriptions/SubscriptionsView.swift @@ -214,8 +214,8 @@ struct SubscriptionsView: View { await feedCache.refresh(using: appEnvironment) LoggingService.shared.info("Pull-to-refresh completed", category: .general) } - .navigationTitle(String(localized: "tabs.subscriptions")) #if !os(tvOS) + .navigationTitle(String(localized: "tabs.subscriptions")) .toolbarTitleDisplayMode(.inlineLarge) #endif .toolbar {