[MAPSME-6193] [ios] Fixed search filter reset.

This commit is contained in:
Ilya Grechuhin 2017-12-13 19:20:56 +03:00
parent ce454c6723
commit 14ea044bbe
4 changed files with 13 additions and 1 deletions

View file

@ -18,5 +18,6 @@ struct Rule;
- (shared_ptr<search::hotels_filter::Rule>)rules;
- (booking::filter::availability::Params)availabilityParams;
- (void)reset;
@end

View file

@ -19,5 +19,6 @@
- (void)mwm_refreshUI { [self.view mwm_refreshUI]; }
- (shared_ptr<search::hotels_filter::Rule>)rules { return nullptr; }
- (booking::filter::availability::Params)availabilityParams { return {}; }
- (void)reset {}
@end

View file

@ -137,6 +137,15 @@ void configButton(UIButton * button, NSString * primaryText, NSString * secondar
[self setNeedsStatusBarAppearanceUpdate];
}
- (void)reset
{
self.check = nil;
self.rating = nil;
self.price = nil;
self.type = nil;
[self.tableView reloadData];
}
- (void)refreshStatusBarAppearance
{
self.navigationController.navigationBar.barStyle = UIBarStyleBlack;

View file

@ -113,7 +113,8 @@
- (void)resetAction
{
[Statistics logEvent:kStatSearchFilterReset withParameters:@{kStatCategory: kStatHotel}];
[self clearFilter];
MWMSearchFilterViewController * filter = [MWMSearch getFilter];
[filter reset];
}
#pragma mark - UIPopoverPresentationControllerDelegate