[ios] Fixed place page buttons status.

This commit is contained in:
VladiMihaylenko 2016-11-09 18:18:46 +03:00 committed by Ilya Grechuhin
parent 004f1960aa
commit 4169311853

View file

@ -289,6 +289,7 @@ void animate(TMWMVoidBlock animate, TMWMVoidBlock completion = nil)
auto const & sections = self.data.sections;
switch (status)
{
case NodeStatus::OnDiskOutOfDate:
case NodeStatus::Undefined:
{
self.isPlacePageButtonsEnabled = NO;
@ -323,7 +324,6 @@ void animate(TMWMVoidBlock animate, TMWMVoidBlock completion = nil)
break;
}
case NodeStatus::Partly: break;
case NodeStatus::OnDiskOutOfDate:
case NodeStatus::OnDisk:
{
self.isPlacePageButtonsEnabled = YES;
@ -556,8 +556,11 @@ void animate(TMWMVoidBlock animate, TMWMVoidBlock completion = nil)
MWMPlacePageButtonCell * c = [tableView dequeueReusableCellWithIdentifier:kButtonsCells[0]];
auto const row = data.buttonsRows[indexPath.row];
[c configForRow:row withDelegate:delegate];
if (row != ButtonsRows::HotelDescription)
[c setEnabled:self.isPlacePageButtonsEnabled];
else
[c setEnabled:YES];
return c;
}