[ios] Fixed auto-download while not on MapViewController.

This commit is contained in:
Ilya Grechuhin 2016-01-29 16:38:59 +03:00 committed by Sergey Yershov
parent a2d5c0e1f9
commit 8902973ee4

View file

@ -596,7 +596,7 @@ NSString * const kAuthorizationSegue = @"Map2AuthorizationSegue";
f.SetAutoDownloadListener([self](storage::TIndex const & idx)
{
if (platform::migrate::NeedMigrate())
if (![self isEqual:self.navigationController.topViewController] || platform::migrate::NeedMigrate())
return;
bool autoDownloadEnabled = true;
(void)Settings::Get(kAutoDownloadEnabledKey, autoDownloadEnabled);