Fix search closing when entering new query after opening recent

This commit is contained in:
Arkadiusz Fal
2022-01-20 23:13:10 +01:00
parent df72bf99ba
commit 8ab97ddbaf
3 changed files with 6 additions and 3 deletions

View File

@@ -34,8 +34,9 @@ final class RecentsModel: ObservableObject {
}
}
func addQuery(_ query: String) {
func addQuery(_ query: String, navigation: NavigationModel? = nil) {
if !query.isEmpty {
navigation?.tabSelection = .search
add(.init(from: query))
}
}