mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-06-10 09:19:22 +00:00
Fix sidebar routerPath
This commit is contained in:
parent
4dcc8a6b23
commit
194b36590f
|
@ -111,8 +111,7 @@ struct IceCubesApp: App {
|
|||
private var sidebarView: some View {
|
||||
SideBarView(selectedTab: $selectedTab,
|
||||
popToRootTab: $popToRootTab,
|
||||
tabs: availableTabs,
|
||||
routerPath: sidebarRouterPath)
|
||||
tabs: availableTabs)
|
||||
{
|
||||
GeometryReader { _ in
|
||||
HStack(spacing: 0) {
|
||||
|
@ -146,6 +145,7 @@ struct IceCubesApp: App {
|
|||
}.onChange(of: $appAccountsManager.currentAccount.id) {
|
||||
sideBarLoadedTabs.removeAll()
|
||||
}
|
||||
.environment(sidebarRouterPath)
|
||||
}
|
||||
|
||||
private var notificationsSecondaryColumn: some View {
|
||||
|
|
|
@ -11,11 +11,11 @@ struct SideBarView<Content: View>: View {
|
|||
@EnvironmentObject private var theme: Theme
|
||||
@Environment(StreamWatcher.self) private var watcher
|
||||
@EnvironmentObject private var userPreferences: UserPreferences
|
||||
@Environment(RouterPath.self) private var routerPath
|
||||
|
||||
@Binding var selectedTab: Tab
|
||||
@Binding var popToRootTab: Tab
|
||||
var tabs: [Tab]
|
||||
@State var routerPath = RouterPath()
|
||||
@ViewBuilder var content: () -> Content
|
||||
|
||||
private func badgeFor(tab: Tab) -> Int {
|
||||
|
@ -122,6 +122,7 @@ struct SideBarView<Content: View>: View {
|
|||
}
|
||||
|
||||
var body: some View {
|
||||
@Bindable var routerPath = routerPath
|
||||
HStack(spacing: 0) {
|
||||
ScrollView {
|
||||
VStack(alignment: .center) {
|
||||
|
|
Loading…
Reference in a new issue