Skip to content

Commit

Permalink
Switch to profile tab to view your own profile, regardless of where y…
Browse files Browse the repository at this point in the history
…ou’re navigating from.
  • Loading branch information
whattherestimefor committed Dec 6, 2024
1 parent 216e12a commit 6035e0e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Mastodon/Coordinator/SceneCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 6035e0e

Please sign in to comment.