diff --git a/Mastodon/Scene/Profile/Header/ProfileHeaderViewController.swift b/Mastodon/Scene/Profile/Header/ProfileHeaderViewController.swift index 3bb6971bb..5f8e878a1 100644 --- a/Mastodon/Scene/Profile/Header/ProfileHeaderViewController.swift +++ b/Mastodon/Scene/Profile/Header/ProfileHeaderViewController.swift @@ -280,8 +280,6 @@ extension ProfileHeaderViewController { } func updateHeaderScrollProgress(_ progress: CGFloat, throttle: CGFloat) { - os_log(.info, log: .debug, "%{public}s[%{public}ld], %{public}s: progress: %.2f", ((#file as NSString).lastPathComponent), #line, #function, progress) - // set title view offset let nameTextFieldInWindow = profileHeaderView.nameTextField.superview!.convert(profileHeaderView.nameTextField.frame, to: nil) let nameTextFieldTopToNavigationBarBottomOffset = containerSafeAreaInset.top - nameTextFieldInWindow.origin.y diff --git a/Mastodon/Scene/Profile/ProfileViewController.swift b/Mastodon/Scene/Profile/ProfileViewController.swift index 6ebeec898..f8a865bc4 100644 --- a/Mastodon/Scene/Profile/ProfileViewController.swift +++ b/Mastodon/Scene/Profile/ProfileViewController.swift @@ -289,6 +289,12 @@ extension ProfileViewController { bindPager() } + override func viewWillAppear(_ animated: Bool) { + super.viewWillAppear(animated) + + navigationController?.navigationBar.prefersLargeTitles = false + } + override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) @@ -374,7 +380,7 @@ extension ProfileViewController { profileHeaderViewController.profileHeaderView.viewModel.$name .receive(on: DispatchQueue.main) .sink { [weak self] name in - guard let self = self else { return } + guard let self = self, isModal == false else { return } self.navigationItem.title = name } .store(in: &disposeBag) diff --git a/Mastodon/Scene/SuggestionAccount/SuggestionAccountViewController.swift b/Mastodon/Scene/SuggestionAccount/SuggestionAccountViewController.swift index bd3df4fac..c9f54b363 100644 --- a/Mastodon/Scene/SuggestionAccount/SuggestionAccountViewController.swift +++ b/Mastodon/Scene/SuggestionAccount/SuggestionAccountViewController.swift @@ -33,10 +33,6 @@ class SuggestionAccountViewController: UIViewController, NeedsDependency { }() override func viewDidLoad() { - - setupNavigationBarAppearance() - defer { setupNavigationBarBackgroundView() } - super.viewDidLoad() title = L10n.Scene.SuggestionAccount.title @@ -63,13 +59,14 @@ class SuggestionAccountViewController: UIViewController, NeedsDependency { view.backgroundColor = .secondarySystemBackground tableView.backgroundColor = .secondarySystemBackground - navigationController?.navigationBar.prefersLargeTitles = true - navigationItem.largeTitleDisplayMode = .always } override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) - + + navigationController?.navigationBar.prefersLargeTitles = true + navigationItem.largeTitleDisplayMode = .automatic + tableView.deselectRow(with: transitionCoordinator, animated: animated) } @@ -124,5 +121,3 @@ extension SuggestionAccountViewController: SuggestionAccountTableViewFooterDeleg viewModel.followAllSuggestedAccounts(self) } } - -extension SuggestionAccountViewController: OnboardingViewControllerAppearance { }