Search: Fix inline navigation title

Transitioning the navigation title to inline while editing search
broke for older OS versions. Make a more bulletproof solution to
inline the navigation title when the user commits a search as that's
a definitive event to listen to.

Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
kingbri 2022-12-31 12:35:28 -05:00
parent 15ad8c5581
commit b0850d43d7

View file

@ -72,7 +72,7 @@ struct ContentView: View {
SearchResultsView()
}
.navigationTitle("Search")
.navigationBarTitleDisplayMode(navModel.isEditingSearch || navModel.isSearching ? .inline : .automatic)
.navigationBarTitleDisplayMode(navModel.isSearching ? .inline : .large)
.navigationSearchBar {
SearchBar("Search",
text: $scrapingModel.searchText,