Skip to content

Commit

Permalink
Add workaround to make toolbar not disappear on iPad
Browse files Browse the repository at this point in the history
  • Loading branch information
prof18 committed Oct 24, 2024
1 parent 33fb7e6 commit fa1b566
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions iosApp/Source/Home/HomeScreenContent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ struct HomeContent: View {
}
.accessibilityIdentifier(TestingTag.shared.HOME_TOOLBAR)
}
// Without this, the toolbar disappear. But with that, there's a weird animation when opening a sheet
.if(UIDevice.current.userInterfaceIdiom == .pad) { view in
view.id(UUID())
}
}
}

Expand All @@ -148,6 +152,10 @@ struct HomeContent: View {
} label: {
Image(systemName: "arrow.uturn.up")
}
// Without this, the toolbar disappear. But with that, there's a weird animation when opening a sheet
.if(UIDevice.current.userInterfaceIdiom == .pad) { view in
view.id(UUID())
}
}
}

Expand All @@ -161,6 +169,10 @@ struct HomeContent: View {
} label: {
Image(systemName: "magnifyingglass")
}
// Without this, the toolbar disappear. But with that, there's a weird animation when opening a sheet
.if(UIDevice.current.userInterfaceIdiom == .pad) { view in
view.id(UUID())
}
}
}

Expand Down Expand Up @@ -206,6 +218,10 @@ struct HomeContent: View {
Image(systemName: "ellipsis.circle")
}
.accessibilityIdentifier(TestingTag.shared.SETTING_BUTTON)
// Without this, the toolbar disappear. But with that, there's a weird animation when opening a sheet
.if(UIDevice.current.userInterfaceIdiom == .pad) { view in
view.id(UUID())
}
}
}

Expand Down

0 comments on commit fa1b566

Please sign in to comment.