Review fixes.

This commit is contained in:
Ilya Grechuhin 2016-07-26 13:39:49 +03:00
parent 0bdd3a0bf2
commit c4dc90c8b5

View file

@ -36,9 +36,14 @@
- (void)refreshButtonEnabledState
{
NodeAttrs nodeAttrs;
GetFramework().Storage().GetNodeAttrs(self.countryId, nodeAttrs);
auto const status = nodeAttrs.m_status;
if (self.countryId == kInvalidCountryId)
{
self.titleButton.enabled = YES;
return;
}
NodeStatuses nodeStatuses;
GetFramework().Storage().GetNodeStatuses(self.countryId, nodeStatuses);
auto const & status = nodeStatuses.m_status;
self.titleButton.enabled = status == NodeStatus::OnDisk || status == NodeStatus::OnDiskOutOfDate;
}