diff --git a/iphone/Maps/UI/PlacePage/PlacePageLayout/MWMPlacePageLayout.mm b/iphone/Maps/UI/PlacePage/PlacePageLayout/MWMPlacePageLayout.mm index 519508f146..caa07ad614 100644 --- a/iphone/Maps/UI/PlacePage/PlacePageLayout/MWMPlacePageLayout.mm +++ b/iphone/Maps/UI/PlacePage/PlacePageLayout/MWMPlacePageLayout.mm @@ -141,18 +141,20 @@ map const kMetaInfoCells = { if (_buttonsSectionEnabled == buttonsSectionEnabled) return; _buttonsSectionEnabled = buttonsSectionEnabled; - auto data = self.data; - auto tv = self.placePageView.tableView; - if (!data || !tv) - return; + dispatch_async(dispatch_get_main_queue(), ^{ + auto data = self.data; + auto tv = self.placePageView.tableView; + if (!data || !tv) + return; - auto const & sections = data.sections; - auto const it = find(sections.begin(), sections.end(), place_page::Sections::Buttons); - if (it == sections.end()) - return; - NSInteger const sectionNumber = distance(sections.begin(), it); - [tv reloadSections:[NSIndexSet indexSetWithIndex:sectionNumber] - withRowAnimation:UITableViewRowAnimationNone]; + auto const & sections = data.sections; + auto const it = find(sections.begin(), sections.end(), place_page::Sections::Buttons); + if (it == sections.end()) + return; + NSInteger const sectionNumber = distance(sections.begin(), it); + [tv reloadSections:[NSIndexSet indexSetWithIndex:sectionNumber] + withRowAnimation:UITableViewRowAnimationNone]; + }); } - (MWMPlacePageActionBar *)actionBar diff --git a/iphone/Maps/UI/PlacePage/PlacePageLayout/Preview/MWMPPPreviewLayoutHelper.mm b/iphone/Maps/UI/PlacePage/PlacePageLayout/Preview/MWMPPPreviewLayoutHelper.mm index 5fcb2f000a..73d57c93e5 100644 --- a/iphone/Maps/UI/PlacePage/PlacePageLayout/Preview/MWMPPPreviewLayoutHelper.mm +++ b/iphone/Maps/UI/PlacePage/PlacePageLayout/Preview/MWMPPPreviewLayoutHelper.mm @@ -357,17 +357,18 @@ array const kPreviewCells = {{[_MWMPPPTitle class], { if (IPAD) return; + dispatch_async(dispatch_get_main_queue(), ^{ + auto data = self.data; + if (!data) + return; - auto data = self.data; - if (!data) - return; + CLS_LOG(@"layoutInOpenState\tisOpen:%@\tLatitude:%@\tLongitude:%@", @(isOpen), + @(data.latLon.lat), @(data.latLon.lon)); - CLS_LOG(@"layoutInOpenState\tisOpen:%@\tLatitude:%@\tLongitude:%@", @(isOpen), @(data.latLon.lat), - @(data.latLon.lon)); - - [self.tableView update:^{ - self.cachedBannerCell.state = isOpen ? MWMAdBannerStateDetailed : MWMAdBannerStateCompact; - }]; + [self.tableView update:^{ + self.cachedBannerCell.state = isOpen ? MWMAdBannerStateDetailed : MWMAdBannerStateCompact; + }]; + }); } - (MWMDirectionView *)directionView