Skip to content

Commit

Permalink
Small bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
alexdremov committed Jul 24, 2022
1 parent 10c0b97 commit 07972a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Sources/PathPresenter/Path.swift
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ public extension PathPresenter {
Update `sheetPresented` state
*/
private mutating func updateSheet() {
if case .sheet = path.last {
if path.last?.isSheet ?? false {
sheetPresented = true
} else {
sheetPresented = false
Expand Down
3 changes: 2 additions & 1 deletion Sources/PathPresenter/RoutingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ public extension PathPresenter {
ZStack(alignment: .topLeading) {
if let rootView = rootView, !sheet {
rootView
.zIndex(-1)
}
ForEach(content, id: \.hashValue) { elem in
switch elem {
Expand Down Expand Up @@ -129,13 +130,13 @@ public extension PathPresenter {
*/
public var body: some View {
coreView
.animation(path.relevantAnimation, value: path)
.sheet(isPresented: $path.sheetPresented,
onDismiss: {
path.sheetDismissed()
}, content: {
shitView
})
.animation(path.relevantAnimation, value: path)
}
}
}

0 comments on commit 07972a6

Please sign in to comment.