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.
This commit is contained in:
Arkadiusz Fal
2026-02-14 16:24:11 +01:00
parent 08c544d161
commit 1fa6d7a4a5
8 changed files with 9 additions and 7 deletions

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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) {

View File

@@ -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 {

View File

@@ -206,7 +206,9 @@ struct SettingsView: View {
}
}
}
#if !os(tvOS)
.navigationTitle(String(localized: "settings.title"))
#endif
#if os(iOS)
.navigationBarTitleDisplayMode(.inline)
#endif

View File

@@ -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 {

View File

@@ -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 {