I'm developing a SwiftUI app which users first see a sidebar (Screen A) with multiple tappable options. This view also have a IOS 14 toolbar with bottom placement. Both of the screens use the same application state - singleton data source.
.toolbar(content: {
ToolbarItem(placement: .bottomBar) {
Text("Settings")
.onTapGesture {
//...
}
})
When user has clicked an option in the Screen A, it navigates user to a second screen (Screen B) by using standard navigation link.
Then, whenever app presents a sheet in Screen B, an empty bottom bar becomes visible in the bottom of the second screen if user updates the data source in this sheet.
It seems that Screen A is also updated when user opened a sheet in Screen B and changed the data source and somehow toolbar area in Screen A is affecting Screen B.
Here is the example code as gist.
Any idea about how to avoid this case?
