[MAPSME-6427] [ios] Fixed search filter state retain.

This commit is contained in:
Ilya Grechuhin 2018-01-11 13:03:14 +03:00 committed by Roman Kuznetsov
parent e24fd3f70f
commit 737e60ac3e
2 changed files with 4 additions and 4 deletions

View file

@ -22,6 +22,7 @@ final class FilterCollectionHolderCell: MWMTableViewCell {
self.tableView = tableView
layout()
collectionView.allowsMultipleSelection = true
collectionView.reloadData()
}
override func awakeFromNib() {

View file

@ -237,7 +237,6 @@ void configButton(UIButton * button, NSString * primaryText, NSString * secondar
- (void)resetTypes
{
m_selectedTypes.clear();
[self.type.collectionView reloadData];
}
- (shared_ptr<search::hotels_filter::Rule>)rules
@ -365,7 +364,7 @@ void configButton(UIButton * button, NSString * primaryText, NSString * secondar
break;
case Section::Rating:
cell = [tableView dequeueReusableCellWithIdentifier:[MWMFilterRatingCell className] forIndexPath:indexPath];
if (!self.rating)
if (self.rating != cell)
{
self.rating = static_cast<MWMFilterRatingCell *>(cell);
[self resetRating];
@ -374,7 +373,7 @@ void configButton(UIButton * button, NSString * primaryText, NSString * secondar
break;
case Section::PriceCategory:
cell = [tableView dequeueReusableCellWithIdentifier:[MWMFilterPriceCategoryCell className] forIndexPath:indexPath];
if (!self.price)
if (self.price != cell)
{
self.price = static_cast<MWMFilterPriceCategoryCell *>(cell);
[self resetPriceCategory];
@ -383,7 +382,7 @@ void configButton(UIButton * button, NSString * primaryText, NSString * secondar
break;
case Section::Type:
cell = [tableView dequeueReusableCellWithIdentifier:[MWMFilterCollectionHolderCell className] forIndexPath:indexPath];
if (!self.type)
if (self.type != cell)
{
self.type = static_cast<MWMFilterCollectionHolderCell *>(cell);
[self resetTypes];