mirror of
https://github.com/yattee/yattee.git
synced 2026-05-13 19:05:03 +00:00
Add Continue Watching toggle to tab bar settings
Exposes ContinueWatchingView as an opt-in compact tab bar item, hidden by default. Uses a short "Continue" label since the full "Continue Watching" string does not fit as a tab bar title.
This commit is contained in:
@@ -25,6 +25,7 @@ struct CompactTabView: View {
|
||||
@State private var downloadsPath = NavigationPath()
|
||||
@State private var sourcesPath = NavigationPath()
|
||||
@State private var settingsPath = NavigationPath()
|
||||
@State private var continueWatchingPath = NavigationPath()
|
||||
|
||||
// Tab selection - using String to support both fixed and dynamic tabs
|
||||
// Initial value is a placeholder; actual startup tab is applied in onAppear
|
||||
@@ -241,6 +242,8 @@ struct CompactTabView: View {
|
||||
sourcesPath.append(destination)
|
||||
case TabBarItem.settings.rawValue:
|
||||
settingsPath.append(destination)
|
||||
case TabBarItem.continueWatching.rawValue:
|
||||
continueWatchingPath.append(destination)
|
||||
default:
|
||||
homePath.append(destination)
|
||||
}
|
||||
@@ -291,6 +294,11 @@ struct CompactTabView: View {
|
||||
SettingsView(showCloseButton: false)
|
||||
.withNavigationDestinations()
|
||||
}
|
||||
case .continueWatching:
|
||||
NavigationStack(path: $continueWatchingPath) {
|
||||
ContinueWatchingView()
|
||||
.withNavigationDestinations()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -321,6 +329,8 @@ struct CompactTabView: View {
|
||||
sourcesPath.append(destination)
|
||||
case TabBarItem.settings.rawValue:
|
||||
settingsPath.append(destination)
|
||||
case TabBarItem.continueWatching.rawValue:
|
||||
continueWatchingPath.append(destination)
|
||||
default:
|
||||
// Fallback to home
|
||||
homePath.append(destination)
|
||||
|
||||
Reference in New Issue
Block a user