[ios] Fixed double-import of KML/KMZ on a cold start

Signed-off-by: Alexander Borsuk <me@alex.bio>
This commit is contained in:
Alexander Borsuk 2022-05-22 00:15:51 +02:00 committed by Alexander Borsuk
parent 0fec35ae05
commit aa4aef7dfe
4 changed files with 6 additions and 10 deletions

View file

@ -9,7 +9,6 @@
@property(nonatomic) MWMMapWidgets * widgetsManager;
@property(nonatomic, readonly) BOOL drapeEngineCreated;
@property(nonatomic, getter=isLaunchByDeepLink) BOOL launchByDeepLink;
@property(nonatomic, readonly) CGSize pixelSize;
@property(nonatomic, readonly) BOOL graphicContextInitialized;

View file

@ -171,7 +171,7 @@ double getExactDPI(double contentScaleFactor)
p.m_surfaceHeight = height;
p.m_visualScale = dp::VisualScale(getExactDPI(self.contentScaleFactor));
p.m_hints.m_isFirstLaunch = [FirstSession isFirstSession];
p.m_hints.m_isLaunchByDeepLink = self.isLaunchByDeepLink;
p.m_hints.m_isLaunchByDeepLink = DeepLinkHandler.shared.isLaunchedByDeeplink;
[self.widgetsManager setupWidgets:p];
GetFramework().CreateDrapeEngine(make_ref(m_factory), std::move(p));

View file

@ -317,8 +317,6 @@ NSString *const kPP2BookmarkEditingSegue = @"PP2BookmarkEditing";
if (self.needDeferFocusNotification)
[self onGetFocus:self.deferredFocusValue];
BOOL const isLaunchedByDeeplink = DeepLinkHandler.shared.isLaunchedByDeeplink;
[self.mapView setLaunchByDeepLink:isLaunchedByDeeplink];
[MWMRouter restoreRouteIfNeeded];
self.view.clipsToBounds = YES;
@ -340,12 +338,10 @@ NSString *const kPP2BookmarkEditingSegue = @"PP2BookmarkEditing";
if ([MWMNavigationDashboardManager sharedManager].state == MWMNavigationDashboardStateHidden)
self.controlsManager.menuState = self.controlsManager.menuRestoreState;
if (isLaunchedByDeeplink)
(void)[DeepLinkHandler.shared handleDeepLink];
else
/// @todo: Uncomment update dialog when will be ready to handle big traffic bursts.
/*
if (!DeepLinkHandler.shared.isLaunchedByDeeplink)
{
/// @todo: Uncomment update dialog when will be ready to handle big traffic bursts.
/*
auto const todo = GetFramework().ToDoAfterUpdate();
switch (todo) {
case Framework::DoAfterUpdate::Migrate:
@ -356,8 +352,8 @@ NSString *const kPP2BookmarkEditingSegue = @"PP2BookmarkEditing";
[self presentViewController:[MWMAutoupdateController instanceWithPurpose:todo] animated:YES completion:nil];
break;
}
*/
}
*/
}
- (void)viewDidLayoutSubviews {

View file

@ -126,6 +126,7 @@ using namespace osm_auth_ios;
[self enableTTSForTheFirstTime];
[[DeepLinkHandler shared] applicationDidFinishLaunching:launchOptions];
// application:openUrl:options is called later for deep links if YES is returned.
return YES;
}