forked from organicmaps/organicmaps
[ios] Fixed non-working and repeated import of KML/KMZ files
Signed-off-by: Alexander Borsuk <me@alex.bio>
This commit is contained in:
parent
56dca0bf43
commit
8573b97b10
3 changed files with 7 additions and 4 deletions
|
@ -24,7 +24,8 @@
|
|||
}
|
||||
|
||||
+ (void)addBookmarksFile:(NSURL *)url {
|
||||
GetFramework().AddBookmarksFile(url.relativePath.UTF8String, false /* isTemporaryFile */);
|
||||
// iOS doesn't create temporary files on import at least in Safari and Files.
|
||||
GetFramework().AddBookmarksFile(url.path.UTF8String, false /* isTemporaryFile */);
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -361,7 +361,7 @@ NSString *const kPP2BookmarkEditingSegue = @"PP2BookmarkEditing";
|
|||
// Cold start deep links should be handled when the map is initialized.
|
||||
// Otherwise PP container view is nil, or there is no animation/selection of the point.
|
||||
if (DeepLinkHandler.shared.isLaunchedByDeeplink)
|
||||
(void)[DeepLinkHandler.shared handleDeepLink];
|
||||
(void)[DeepLinkHandler.shared handleDeepLinkAndReset];
|
||||
}
|
||||
|
||||
- (void)viewDidLayoutSubviews {
|
||||
|
|
|
@ -44,9 +44,11 @@
|
|||
return (url.queryItems?.first(where: { $0.name == "backurl" })?.value ?? nil)
|
||||
}
|
||||
|
||||
func handleDeepLink() -> Bool {
|
||||
func handleDeepLinkAndReset() -> Bool {
|
||||
if let url = self.url {
|
||||
return handleDeepLink(url: url)
|
||||
let result = handleDeepLink(url: url)
|
||||
reset()
|
||||
return result
|
||||
}
|
||||
LOG(.error, "handleDeepLink is called with nil URL")
|
||||
return false
|
||||
|
|
Loading…
Add table
Reference in a new issue