@@ -23,8 +23,6 @@ internal final class SearchViewController: UITableViewController {
2323
2424 private let backgroundView = UIView ( )
2525 private let searchLoaderIndicator = UIActivityIndicatorView ( )
26- private let showSortAndFilterHeader = MutableProperty < Bool > ( false ) // Bound to the view model property
27-
2826 private var sortAndFilterHeader : UIViewController ?
2927
3028 private var searchBarWidth : CGFloat {
@@ -95,15 +93,11 @@ internal final class SearchViewController: UITableViewController {
9593 self . viewModel. outputs. showEmptyState
9694 . observeForUI ( )
9795 . observeValues { [ weak self] params, visible in
98- if featureSearchNewEmptyState ( ) {
99- let data = SearchEmptyStateSearchData (
100- query: params. query,
101- hasFilters: self ? . viewModel. outputs. searchFilters. hasFilters == true
102- )
103- self ? . dataSource. load ( data: data, visible: visible)
104- } else {
105- self ? . dataSource. load ( params: params, visible: visible)
106- }
96+ let data = SearchEmptyStateSearchData (
97+ query: params. query,
98+ hasFilters: self ? . viewModel. outputs. searchFilters. hasFilters == true
99+ )
100+ self ? . dataSource. load ( data: data, visible: visible)
107101 self ? . tableView. reloadData ( )
108102 }
109103
@@ -127,8 +121,6 @@ internal final class SearchViewController: UITableViewController {
127121 // All other filters go to the same modal.
128122 self ? . showFilters ( filterType: type)
129123 }
130-
131- self . showSortAndFilterHeader <~ self . viewModel. outputs. showSortAndFilterHeader
132124 }
133125
134126 fileprivate func present( sheet viewController: UIViewController , withHeight _: CGFloat ) {
@@ -263,8 +255,7 @@ internal final class SearchViewController: UITableViewController {
263255 }
264256
265257 override func tableView( _: UITableView , viewForHeaderInSection section: Int ) -> UIView ? {
266- guard section == SearchDataSource . Section. projects. rawValue,
267- self . showSortAndFilterHeader. value == true else {
258+ guard section == SearchDataSource . Section. projects. rawValue else {
268259 return nil
269260 }
270261
@@ -273,8 +264,7 @@ internal final class SearchViewController: UITableViewController {
273264
274265 private var headerHeight : CGFloat ? = nil
275266 override func tableView( _: UITableView , heightForHeaderInSection section: Int ) -> CGFloat {
276- guard section == SearchDataSource . Section. projects. rawValue,
277- self . showSortAndFilterHeader. value == true else {
267+ guard section == SearchDataSource . Section. projects. rawValue else {
278268 return 0
279269 }
280270
0 commit comments