diff --git a/IceCubesApp/App/Main/AppView.swift b/IceCubesApp/App/Main/AppView.swift index 3632e880..c9cac65d 100644 --- a/IceCubesApp/App/Main/AppView.swift +++ b/IceCubesApp/App/Main/AppView.swift @@ -89,7 +89,7 @@ struct AppView: View { } .tag(tab) .badge(badgeFor(tab: tab)) - .toolbarBackground(theme.primaryBackgroundColor.opacity(0.50), for: .tabBar) + .toolbarBackground(theme.primaryBackgroundColor.opacity(0.30), for: .tabBar) } } .id(appAccountsManager.currentClient.id) diff --git a/IceCubesApp/App/Tabs/ExploreTab.swift b/IceCubesApp/App/Tabs/ExploreTab.swift index 1292bbf5..5b2cce1c 100644 --- a/IceCubesApp/App/Tabs/ExploreTab.swift +++ b/IceCubesApp/App/Tabs/ExploreTab.swift @@ -21,7 +21,7 @@ struct ExploreTab: View { ExploreView(scrollToTopSignal: $scrollToTopSignal) .withAppRouter() .withSheetDestinations(sheetDestinations: $routerPath.presentedSheet) - .toolbarBackground(theme.primaryBackgroundColor.opacity(0.50), for: .navigationBar) + .toolbarBackground(theme.primaryBackgroundColor.opacity(0.30), for: .navigationBar) .toolbar { ToolbarTab(routerPath: $routerPath) } diff --git a/IceCubesApp/App/Tabs/MessagesTab.swift b/IceCubesApp/App/Tabs/MessagesTab.swift index d94886ce..d265b73d 100644 --- a/IceCubesApp/App/Tabs/MessagesTab.swift +++ b/IceCubesApp/App/Tabs/MessagesTab.swift @@ -26,7 +26,7 @@ struct MessagesTab: View { .toolbar { ToolbarTab(routerPath: $routerPath) } - .toolbarBackground(theme.primaryBackgroundColor.opacity(0.50), for: .navigationBar) + .toolbarBackground(theme.primaryBackgroundColor.opacity(0.30), for: .navigationBar) .id(client.id) } .onChange(of: $popToRootTab.wrappedValue) { _, newValue in diff --git a/IceCubesApp/App/Tabs/NavigationTab.swift b/IceCubesApp/App/Tabs/NavigationTab.swift index 78ecd6ed..4e328afb 100644 --- a/IceCubesApp/App/Tabs/NavigationTab.swift +++ b/IceCubesApp/App/Tabs/NavigationTab.swift @@ -32,7 +32,7 @@ struct NavigationTab: View { .toolbar { ToolbarTab(routerPath: $routerPath) } - .toolbarBackground(theme.primaryBackgroundColor.opacity(0.50), for: .navigationBar) + .toolbarBackground(theme.primaryBackgroundColor.opacity(0.30), for: .navigationBar) .onChange(of: client.id) { routerPath.path = [] } diff --git a/IceCubesApp/App/Tabs/NotificationTab.swift b/IceCubesApp/App/Tabs/NotificationTab.swift index 1a05fcdf..a2dc2c58 100644 --- a/IceCubesApp/App/Tabs/NotificationTab.swift +++ b/IceCubesApp/App/Tabs/NotificationTab.swift @@ -42,7 +42,7 @@ struct NotificationsTab: View { } ToolbarTab(routerPath: $routerPath) } - .toolbarBackground(theme.primaryBackgroundColor.opacity(0.50), for: .navigationBar) + .toolbarBackground(theme.primaryBackgroundColor.opacity(0.30), for: .navigationBar) .id(client.id) } .onAppear { diff --git a/IceCubesApp/App/Tabs/ProfileTab.swift b/IceCubesApp/App/Tabs/ProfileTab.swift index 6c750a8a..22a80747 100644 --- a/IceCubesApp/App/Tabs/ProfileTab.swift +++ b/IceCubesApp/App/Tabs/ProfileTab.swift @@ -23,7 +23,7 @@ struct ProfileTab: View { AccountDetailView(account: account, scrollToTopSignal: $scrollToTopSignal) .withAppRouter() .withSheetDestinations(sheetDestinations: $routerPath.presentedSheet) - .toolbarBackground(theme.primaryBackgroundColor.opacity(0.50), for: .navigationBar) + .toolbarBackground(theme.primaryBackgroundColor.opacity(0.30), for: .navigationBar) .id(account.id) } else { AccountDetailView(account: .placeholder(), scrollToTopSignal: $scrollToTopSignal) diff --git a/IceCubesApp/App/Tabs/Settings/SettingsTab.swift b/IceCubesApp/App/Tabs/Settings/SettingsTab.swift index 5d30a3a8..9b4d9fb4 100644 --- a/IceCubesApp/App/Tabs/Settings/SettingsTab.swift +++ b/IceCubesApp/App/Tabs/Settings/SettingsTab.swift @@ -47,7 +47,7 @@ struct SettingsTabs: View { #endif .navigationTitle(Text("settings.title")) .navigationBarTitleDisplayMode(.inline) - .toolbarBackground(theme.primaryBackgroundColor.opacity(0.50), for: .navigationBar) + .toolbarBackground(theme.primaryBackgroundColor.opacity(0.30), for: .navigationBar) .toolbar { if isModal { ToolbarItem { diff --git a/IceCubesApp/App/Tabs/Timeline/TimelineTab.swift b/IceCubesApp/App/Tabs/Timeline/TimelineTab.swift index ed0db7f2..f0b76c55 100644 --- a/IceCubesApp/App/Tabs/Timeline/TimelineTab.swift +++ b/IceCubesApp/App/Tabs/Timeline/TimelineTab.swift @@ -51,7 +51,7 @@ struct TimelineTab: View { .toolbar { toolbarView } - .toolbarBackground(theme.primaryBackgroundColor.opacity(0.50), for: .navigationBar) + .toolbarBackground(theme.primaryBackgroundColor.opacity(0.30), for: .navigationBar) .id(client.id) } .onAppear { diff --git a/Packages/DesignSystem/Sources/DesignSystem/ConditionalModifier.swift b/Packages/DesignSystem/Sources/DesignSystem/ConditionalModifier.swift new file mode 100644 index 00000000..be1f25a1 --- /dev/null +++ b/Packages/DesignSystem/Sources/DesignSystem/ConditionalModifier.swift @@ -0,0 +1,11 @@ +import SwiftUI + +public extension View { + @ViewBuilder func `if`(_ condition: Bool, transform: (Self) -> Content) -> some View { + if condition { + transform(self) + } else { + self + } + } +} diff --git a/Packages/Timeline/Sources/Timeline/View/TimelineView.swift b/Packages/Timeline/Sources/Timeline/View/TimelineView.swift index 9618bd85..7e75f2a4 100644 --- a/Packages/Timeline/Sources/Timeline/View/TimelineView.swift +++ b/Packages/Timeline/Sources/Timeline/View/TimelineView.swift @@ -82,13 +82,19 @@ public struct TimelineView: View { } .safeAreaInset(edge: .top, spacing: 0) { if canFilterTimeline, !pinnedFilters.isEmpty { - TimelineQuickAccessPills(pinnedFilters: $pinnedFilters, timeline: $timeline) - .padding(.vertical, 8) - .padding(.horizontal, .layoutPadding) - .background(theme.primaryBackgroundColor.opacity(0.50)) - .background(Material.regular) + VStack(spacing: 0) { + TimelineQuickAccessPills(pinnedFilters: $pinnedFilters, timeline: $timeline) + .padding(.vertical, 8) + .padding(.horizontal, .layoutPadding) + .background(theme.primaryBackgroundColor.opacity(0.30)) + .background(Material.ultraThin) + Divider() + } } } + .if(canFilterTimeline && !pinnedFilters.isEmpty) { view in + view.toolbarBackground(.hidden, for: .navigationBar) + } .onChange(of: viewModel.scrollToIndex) { _, newValue in if let collectionView, let newValue,