mirror of
https://github.com/yattee/yattee.git
synced 2026-02-21 18:29:44 +00:00
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:
@@ -137,8 +137,8 @@ struct BookmarksListView: View {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
.navigationTitle(String(localized: "home.bookmarks.title"))
|
|
||||||
#if !os(tvOS)
|
#if !os(tvOS)
|
||||||
|
.navigationTitle(String(localized: "home.bookmarks.title"))
|
||||||
.toolbarTitleDisplayMode(.inlineLarge)
|
.toolbarTitleDisplayMode(.inlineLarge)
|
||||||
.searchable(text: $searchText, prompt: Text(String(localized: "bookmarks.search.placeholder")))
|
.searchable(text: $searchText, prompt: Text(String(localized: "bookmarks.search.placeholder")))
|
||||||
.toolbar {
|
.toolbar {
|
||||||
|
|||||||
@@ -136,8 +136,8 @@ struct HistoryListView: View {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
.navigationTitle(String(localized: "home.history.title"))
|
|
||||||
#if !os(tvOS)
|
#if !os(tvOS)
|
||||||
|
.navigationTitle(String(localized: "home.history.title"))
|
||||||
.toolbarTitleDisplayMode(.inlineLarge)
|
.toolbarTitleDisplayMode(.inlineLarge)
|
||||||
.searchable(text: $searchText, prompt: Text(String(localized: "history.search.placeholder")))
|
.searchable(text: $searchText, prompt: Text(String(localized: "history.search.placeholder")))
|
||||||
.toolbar {
|
.toolbar {
|
||||||
|
|||||||
@@ -62,13 +62,13 @@ struct HomeView: View {
|
|||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
mainContent
|
mainContent
|
||||||
|
#if !os(tvOS)
|
||||||
.navigationTitle(String(localized: "tabs.home"))
|
.navigationTitle(String(localized: "tabs.home"))
|
||||||
.navigationSubtitleIfAvailable(
|
.navigationSubtitleIfAvailable(
|
||||||
settingsManager?.incognitoModeEnabled == true
|
settingsManager?.incognitoModeEnabled == true
|
||||||
? String(localized: "home.incognitoMode.subtitle")
|
? String(localized: "home.incognitoMode.subtitle")
|
||||||
: nil
|
: nil
|
||||||
)
|
)
|
||||||
#if !os(tvOS)
|
|
||||||
.toolbarTitleDisplayMode(.inlineLarge)
|
.toolbarTitleDisplayMode(.inlineLarge)
|
||||||
#endif
|
#endif
|
||||||
.toolbar {
|
.toolbar {
|
||||||
|
|||||||
@@ -53,8 +53,8 @@ struct MediaSourcesView: View {
|
|||||||
sourcesList
|
sourcesList
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.navigationTitle(String(localized: "sources.title"))
|
|
||||||
#if !os(tvOS)
|
#if !os(tvOS)
|
||||||
|
.navigationTitle(String(localized: "sources.title"))
|
||||||
.toolbarTitleDisplayMode(.inlineLarge)
|
.toolbarTitleDisplayMode(.inlineLarge)
|
||||||
.toolbar {
|
.toolbar {
|
||||||
ToolbarItem(placement: .primaryAction) {
|
ToolbarItem(placement: .primaryAction) {
|
||||||
|
|||||||
@@ -127,8 +127,8 @@ struct SearchView: View {
|
|||||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.navigationTitle(String(localized: "tabs.search"))
|
|
||||||
#if !os(tvOS)
|
#if !os(tvOS)
|
||||||
|
.navigationTitle(String(localized: "tabs.search"))
|
||||||
.toolbarTitleDisplayMode(.inlineLarge)
|
.toolbarTitleDisplayMode(.inlineLarge)
|
||||||
#endif
|
#endif
|
||||||
.toolbar {
|
.toolbar {
|
||||||
|
|||||||
@@ -206,7 +206,9 @@ struct SettingsView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#if !os(tvOS)
|
||||||
.navigationTitle(String(localized: "settings.title"))
|
.navigationTitle(String(localized: "settings.title"))
|
||||||
|
#endif
|
||||||
#if os(iOS)
|
#if os(iOS)
|
||||||
.navigationBarTitleDisplayMode(.inline)
|
.navigationBarTitleDisplayMode(.inline)
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -99,8 +99,8 @@ struct ManageChannelsView: View {
|
|||||||
viewWidth = newWidth
|
viewWidth = newWidth
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.navigationTitle(String(localized: "subscriptions.channels.title"))
|
|
||||||
#if !os(tvOS)
|
#if !os(tvOS)
|
||||||
|
.navigationTitle(String(localized: "subscriptions.channels.title"))
|
||||||
.toolbarTitleDisplayMode(.inlineLarge)
|
.toolbarTitleDisplayMode(.inlineLarge)
|
||||||
.searchable(text: $searchText, prompt: Text(String(localized: "channels.search.placeholder")))
|
.searchable(text: $searchText, prompt: Text(String(localized: "channels.search.placeholder")))
|
||||||
.toolbar {
|
.toolbar {
|
||||||
|
|||||||
@@ -214,8 +214,8 @@ struct SubscriptionsView: View {
|
|||||||
await feedCache.refresh(using: appEnvironment)
|
await feedCache.refresh(using: appEnvironment)
|
||||||
LoggingService.shared.info("Pull-to-refresh completed", category: .general)
|
LoggingService.shared.info("Pull-to-refresh completed", category: .general)
|
||||||
}
|
}
|
||||||
.navigationTitle(String(localized: "tabs.subscriptions"))
|
|
||||||
#if !os(tvOS)
|
#if !os(tvOS)
|
||||||
|
.navigationTitle(String(localized: "tabs.subscriptions"))
|
||||||
.toolbarTitleDisplayMode(.inlineLarge)
|
.toolbarTitleDisplayMode(.inlineLarge)
|
||||||
#endif
|
#endif
|
||||||
.toolbar {
|
.toolbar {
|
||||||
|
|||||||
Reference in New Issue
Block a user