From 6035e0e69def1a43207676afebde368a1dfc42e4 Mon Sep 17 00:00:00 2001 From: shannon Date: Fri, 6 Dec 2024 13:48:58 -0500 Subject: [PATCH] =?UTF-8?q?Switch=20to=20profile=20tab=20to=20view=20your?= =?UTF-8?q?=20own=20profile,=20regardless=20of=20where=20you=E2=80=99re=20?= =?UTF-8?q?navigating=20from.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Mastodon/Coordinator/SceneCoordinator.swift | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Mastodon/Coordinator/SceneCoordinator.swift b/Mastodon/Coordinator/SceneCoordinator.swift index 568d68f08..e11ff170c 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 {