From 8718042f1dc23454f3c0b9cf632f7d7353f51a71 Mon Sep 17 00:00:00 2001 From: Selim Mustafaev Date: Sat, 26 Oct 2024 17:52:16 +0300 Subject: [PATCH] Disable unfinished new filters screen --- AutoCat.xcodeproj/project.pbxproj | 4 +-- AutoCat/Controllers/SearchController.swift | 38 +++++++++++----------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/AutoCat.xcodeproj/project.pbxproj b/AutoCat.xcodeproj/project.pbxproj index bc18b3c..fd3a4eb 100644 --- a/AutoCat.xcodeproj/project.pbxproj +++ b/AutoCat.xcodeproj/project.pbxproj @@ -1653,7 +1653,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = AutoCat/AutoCat.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 137; + CURRENT_PROJECT_VERSION = 138; DEVELOPMENT_TEAM = 46DTTB8X4S; INFOPLIST_FILE = AutoCat/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = AutoCat; @@ -1680,7 +1680,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CODE_SIGN_ENTITLEMENTS = AutoCat/AutoCat.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 137; + CURRENT_PROJECT_VERSION = 138; DEVELOPMENT_TEAM = 46DTTB8X4S; INFOPLIST_FILE = AutoCat/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = AutoCat; diff --git a/AutoCat/Controllers/SearchController.swift b/AutoCat/Controllers/SearchController.swift index 7eddaa7..c3cbe98 100644 --- a/AutoCat/Controllers/SearchController.swift +++ b/AutoCat/Controllers/SearchController.swift @@ -184,26 +184,26 @@ class SearchController: UIViewController, UISearchResultsUpdating, UITableViewDe } func showFilter() async throws { -// let sb = UIStoryboard(name: "Main", bundle: nil) -// let controller = sb.instantiateViewController(identifier: "FiltersController") as FiltersController -// controller.filter = self.filter -// controller.onDone = { -// self.filter = controller.filter -// self.datasource.setSortParameter(self.filter.sortBy ?? .updatedDate) -// self.filter.needReset = true -// self.filter.scope = SearchScope(rawValue: self.searchController.searchBar.selectedScopeButtonIndex) ?? .plateNumber -// self.updateSearchResults(with: self.filter) -// } -// self.navigationController?.pushViewController(controller, animated: true) - - if let navigationController = self.navigationController { - let coordinator = FiltersCoordinator(navController: navigationController, filter: filter) - filter = try await coordinator.start() - datasource.setSortParameter(self.filter.sortBy ?? .updatedDate) - filter.needReset = true - filter.scope = SearchScope(rawValue: self.searchController.searchBar.selectedScopeButtonIndex) ?? .plateNumber - updateSearchResults(with: self.filter) + let sb = UIStoryboard(name: "Main", bundle: nil) + let controller = sb.instantiateViewController(identifier: "FiltersController") as FiltersController + controller.filter = self.filter + controller.onDone = { + self.filter = controller.filter + self.datasource.setSortParameter(self.filter.sortBy ?? .updatedDate) + self.filter.needReset = true + self.filter.scope = SearchScope(rawValue: self.searchController.searchBar.selectedScopeButtonIndex) ?? .plateNumber + self.updateSearchResults(with: self.filter) } + self.navigationController?.pushViewController(controller, animated: true) + +// if let navigationController = self.navigationController { +// let coordinator = FiltersCoordinator(navController: navigationController, filter: filter) +// filter = try await coordinator.start() +// datasource.setSortParameter(self.filter.sortBy ?? .updatedDate) +// filter.needReset = true +// filter.scope = SearchScope(rawValue: self.searchController.searchBar.selectedScopeButtonIndex) ?? .plateNumber +// updateSearchResults(with: self.filter) +// } } func showOnMap() {