Skip to content

Commit

Permalink
fix tab bar hiding
Browse files Browse the repository at this point in the history
  • Loading branch information
xbjfk committed Mar 28, 2024
1 parent 0f17887 commit 9636abe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 0 additions & 6 deletions CubeTime/Sessions/ImportExport.swift
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,6 @@ struct ExportFlowPickSessions: View {
.padding(.bottom, UIDevice.deviceIsPad && hSizeClass == .regular ? 8 : (UIDevice.hasBottomBar ? 0 : nil))
}
}
.onAppear {
tabRouter.hideTabBar = true
}
.onDisappear {
tabRouter.hideTabBar = false
}
}
}

Expand Down
8 changes: 8 additions & 0 deletions CubeTime/Sessions/SessionsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ struct SessionsView: View {
@Environment(\.managedObjectContext) var managedObjectContext
@Environment(\.horizontalSizeClass) var hSizeClass

@EnvironmentObject var tabRouter: TabRouter

@State var showNewSessionPopUp = false

@StateObject var cloudkitStatusManager = CloudkitStatusManager()
Expand Down Expand Up @@ -63,6 +65,12 @@ struct SessionsView: View {
NavigationLink(destination: ImportFlow(), isActive: $showImport) { EmptyView() }
}
)
.onChange(of: showExport) { newValue in
tabRouter.hideTabBar = newValue
}
.onChange(of: showImport) { newValue in
tabRouter.hideTabBar = showImport
}

Spacer()

Expand Down

0 comments on commit 9636abe

Please sign in to comment.