[iOS] Fixed crash in BookmarksCoordinator

https://jira.mail.ru/browse/MAPSME-14712
This commit is contained in:
Alexander Boriskov 2020-09-01 12:43:11 +03:00 committed by Maksim Andrianov
parent 8d8601a4e6
commit 1b47a2fbde
2 changed files with 2 additions and 2 deletions

View file

@ -16,7 +16,7 @@ final class BookmarksTabViewController: TabViewController {
private weak var coordinator: BookmarksCoordinator?
init(coordinator: BookmarksCoordinator?) {
@objc init(coordinator: BookmarksCoordinator?) {
super.init(nibName: nil, bundle: nil)
self.coordinator = coordinator
}

View file

@ -640,7 +640,7 @@ NSString *const kPP2BookmarkEditingSegue = @"PP2BookmarkEditing";
- (void)openCatalogInternal:(MWMCatalogWebViewController *)catalog animated:(BOOL)animated utm:(MWMUTM)utm {
[self.navigationController popToRootViewControllerAnimated:NO];
auto bookmarks = [[MWMBookmarksTabViewController alloc] init];
auto bookmarks = [[MWMBookmarksTabViewController alloc] initWithCoordinator:self.bookmarksCoordinator];
bookmarks.activeTab = ActiveTabCatalog;
NSMutableArray<UIViewController *> *controllers = [self.navigationController.viewControllers mutableCopy];
[controllers addObjectsFromArray:@[bookmarks, catalog]];