diff --git a/Mastodon/Coordinator/SceneCoordinator.swift b/Mastodon/Coordinator/SceneCoordinator.swift index 568d68f080..e11ff170cd 100644 --- a/Mastodon/Coordinator/SceneCoordinator.swift +++ b/Mastodon/Coordinator/SceneCoordinator.swift @@ -280,6 +280,17 @@ extension SceneCoordinator { guard var presentingViewController = sender ?? sceneDelegate.window?.rootViewController?.topMost else { return nil } + + if case let .profile(profileType) = scene { + switch profileType { + case .me: + switchToTabBar(tab: .me) + return tabBarController.meProfileViewController + case .notMe: + break + } + } + // adapt for child controller if let navigationControllerVisibleViewController = presentingViewController.navigationController?.visibleViewController { switch viewController {