forked from organicmaps/organicmaps
[MAPSME-5353] [ios] Fixed cian category display.
This commit is contained in:
parent
3c9cc3b87e
commit
18291b1768
5 changed files with 8 additions and 8 deletions
|
@ -255,6 +255,7 @@ using Observers = NSHashTable<Observer>;
|
|||
|
||||
- (void)changeToDefaultState
|
||||
{
|
||||
[self.tabbedController resetCategories];
|
||||
[self.navigationController popToRootViewControllerAnimated:NO];
|
||||
|
||||
[self animateConstraints:^{
|
||||
|
|
|
@ -7,4 +7,6 @@
|
|||
|
||||
- (void)attachCell:(MWMSearchTabbedCollectionViewCell *)cell;
|
||||
|
||||
- (void)resetCategories;
|
||||
|
||||
@end
|
||||
|
|
|
@ -13,16 +13,10 @@ extern NSString * const kCianCategory = @"cian";
|
|||
vector<string> m_categories;
|
||||
}
|
||||
|
||||
- (instancetype)init
|
||||
{
|
||||
self = [super init];
|
||||
if (self)
|
||||
m_categories = GetFramework().GetDisplayedCategories().GetKeys();
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)attachCell:(MWMSearchTabbedCollectionViewCell *)cell
|
||||
{
|
||||
if (m_categories.empty())
|
||||
m_categories = GetFramework().GetDisplayedCategories().GetKeys();
|
||||
[cell removeNoResultsView];
|
||||
UITableView * tableView = cell.tableView;
|
||||
tableView.estimatedRowHeight = 44.;
|
||||
|
@ -35,6 +29,7 @@ extern NSString * const kCianCategory = @"cian";
|
|||
[tableView reloadData];
|
||||
}
|
||||
|
||||
- (void)resetCategories { m_categories.clear(); }
|
||||
#pragma mark - UITableViewDataSource
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
|
||||
|
|
|
@ -11,5 +11,6 @@
|
|||
|
||||
- (void)tabButtonPressed:(MWMSearchTabButtonsView *)sender;
|
||||
- (void)resetSelectedTab;
|
||||
- (void)resetCategories;
|
||||
|
||||
@end
|
||||
|
|
|
@ -67,6 +67,7 @@ BOOL isOffsetInButton(CGFloat offset, MWMSearchTabButtonsView * button)
|
|||
[[NSUserDefaults standardUserDefaults] integerForKey:kSelectedButtonTagKey];
|
||||
}
|
||||
|
||||
- (void)resetCategories { [self.categoriesManager resetCategories]; }
|
||||
- (void)viewWillAppear:(BOOL)animated
|
||||
{
|
||||
self.scrollIndicator.hidden = YES;
|
||||
|
|
Loading…
Add table
Reference in a new issue