Skip to content

Commit

Permalink
Hide tab bar when exporting
Browse files Browse the repository at this point in the history
  • Loading branch information
xbjfk committed Mar 26, 2024
1 parent 9e702ad commit d40157d
Showing 1 changed file with 9 additions and 18 deletions.
27 changes: 9 additions & 18 deletions CubeTime/Sessions/ImportExport.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ struct ImportFlow: View {

struct ExportFlowPickSessions: View {
@EnvironmentObject var stopwatchManager: StopwatchManager
@EnvironmentObject var tabRouter: TabRouter
@StateObject var exportViewModel: ExportViewModel = ExportViewModel()

@Environment(\.horizontalSizeClass) var hSizeClass
Expand Down Expand Up @@ -78,17 +79,15 @@ struct ExportFlowPickSessions: View {
}
}
.padding(.horizontal)
.if(!(UIDevice.deviceIsPad && hSizeClass == .regular)) { view in
view
.padding(.bottom, 58)
.padding(.bottom, UIDevice.hasBottomBar ? 0 : nil)
}
.if(UIDevice.deviceIsPad && hSizeClass == .regular) { view in
view
.padding(.bottom, 8)
}
.padding(.bottom, UIDevice.deviceIsPad && hSizeClass == .regular ? 8 : (UIDevice.hasBottomBar ? 0 : nil))
}
}
.onAppear {
tabRouter.hideTabBar = true
}
.onDisappear {
tabRouter.hideTabBar = false
}
}
}

Expand Down Expand Up @@ -172,15 +171,7 @@ struct ExportFlowPickFormats: View {
}
}
.padding(.horizontal)
.if(!(UIDevice.deviceIsPad && hSizeClass == .regular)) { view in
view
.padding(.bottom, 58)
.padding(.bottom, UIDevice.hasBottomBar ? 0 : nil)
}
.if(UIDevice.deviceIsPad && hSizeClass == .regular) { view in
view
.padding(.bottom, 8)
}
.padding(.bottom, UIDevice.deviceIsPad && hSizeClass == .regular ? 8 : (UIDevice.hasBottomBar ? 0 : nil))
}
}
.fileExporter(isPresented: $showFilePathSave, documents: exportViewModel.selectedFormats, contentType: .data ,onCompletion: { result in
Expand Down

0 comments on commit d40157d

Please sign in to comment.