forked from organicmaps/organicmaps-tmp
[iOS] don't set guests in hotel fiter by default
https://jira.mail.ru/browse/MAPSME-14713
This commit is contained in:
parent
81104fa3da
commit
e417fb23cc
2 changed files with 6 additions and 11 deletions
|
@ -22,15 +22,6 @@ static int8_t kAgeOfInfant = 2;
|
|||
|
||||
@implementation MWMHotelParams
|
||||
|
||||
- (instancetype)init {
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_numberOfRooms = 1;
|
||||
_numberOfAdults = 2;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (instancetype)initWithPlacePageData:(PlacePageData *)data
|
||||
{
|
||||
self = [self init];
|
||||
|
|
|
@ -167,8 +167,12 @@ using Observers = NSHashTable<Observer>;
|
|||
controller.delegate = self;
|
||||
MWMHotelParams *filter = [MWMSearch getFilter];
|
||||
if (filter != nil) {
|
||||
controller.roomsInitialCount = filter.numberOfRooms;
|
||||
controller.adultsInitialCount = filter.numberOfAdults;
|
||||
if (filter.numberOfRooms > 0) {
|
||||
controller.roomsInitialCount = filter.numberOfRooms;
|
||||
}
|
||||
if (filter.numberOfAdults > 0) {
|
||||
controller.adultsInitialCount = filter.numberOfAdults;
|
||||
}
|
||||
controller.childrenInitialCount = filter.numberOfChildren;
|
||||
controller.infantsInitialCount = filter.numberOfInfants;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue