Fix search
This commit is contained in:
parent
dccd345175
commit
4ef18b88a1
@ -1136,7 +1136,7 @@
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_ENTITLEMENTS = AutoCat/AutoCat.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 105;
|
||||
CURRENT_PROJECT_VERSION = 107;
|
||||
DEVELOPMENT_TEAM = 46DTTB8X4S;
|
||||
INFOPLIST_FILE = AutoCat/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||
@ -1161,7 +1161,7 @@
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_ENTITLEMENTS = AutoCat/AutoCat.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 105;
|
||||
CURRENT_PROJECT_VERSION = 107;
|
||||
DEVELOPMENT_TEAM = 46DTTB8X4S;
|
||||
INFOPLIST_FILE = AutoCat/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||
|
||||
@ -15,8 +15,7 @@ class ReportController: FormViewController, MediaBrowserViewControllerDataSource
|
||||
|
||||
var vehicle: Vehicle? {
|
||||
didSet {
|
||||
//loadViewIfNeeded()
|
||||
if isViewLoaded {
|
||||
if isViewLoaded && self.view.window != nil {
|
||||
self.updateReport()
|
||||
self.form.allSections.forEach { $0.reload() }
|
||||
self.navigationController?.setNavigationBarHidden(self.vehicle == nil, animated: false)
|
||||
|
||||
@ -60,12 +60,11 @@ class SearchController: UIViewController, UISearchResultsUpdating, UITableViewDe
|
||||
|
||||
DispatchQueue.main.async {
|
||||
self.filterRelay
|
||||
//.throttle(.seconds(2), scheduler: MainScheduler.instance)
|
||||
.debounce(.milliseconds(500), scheduler: MainScheduler.instance)
|
||||
.do(onNext: { _ in
|
||||
self.showProgress()
|
||||
})
|
||||
.flatMap { Api.getVehicles(with: $0, pageToken: self.datasource.pageToken).do(onError: { print($0) }).catchErrorJustReturn(PagedResponse<Vehicle>()) }
|
||||
.flatMapLatest { Api.getVehicles(with: $0, pageToken: self.datasource.pageToken).do(onError: { print($0) }).catchErrorJustReturn(PagedResponse<Vehicle>()) }
|
||||
.observeOn(MainScheduler.instance)
|
||||
.do(onNext: {
|
||||
if let count = $0.count {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user