mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Searching disables the filters (#2530)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user