Searching disables the filters (#2530)

This commit is contained in:
Mauro
2024-03-06 11:02:30 +01:00
committed by GitHub
parent 7f3451216d
commit 7754b9b8dc
18 changed files with 84 additions and 74 deletions
@@ -17,17 +17,9 @@
import SwiftUI
struct HomeScreenRoomList: View {
@Environment(\.isSearching) var isSearchFieldFocused
@ObservedObject var context: HomeScreenViewModel.Context
var body: some View {
filteredContent
.onChange(of: isSearchFieldFocused) { context.isSearchFieldFocused = $0 }
}
@ViewBuilder
private var filteredContent: some View {
// Hide the room list when the search bar is focused but the query is empty
// This works hand in hand with the room list service layer filtering and
// avoids glitches when focusing the search bar