Don't set title for profile-screen when modal (IOS-157)
aka when account-suggestion-screen
This commit is contained in:
parent
e20b2e4e11
commit
2b59def31e
|
@ -280,8 +280,6 @@ extension ProfileHeaderViewController {
|
||||||
}
|
}
|
||||||
|
|
||||||
func updateHeaderScrollProgress(_ progress: CGFloat, throttle: CGFloat) {
|
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
|
// set title view offset
|
||||||
let nameTextFieldInWindow = profileHeaderView.nameTextField.superview!.convert(profileHeaderView.nameTextField.frame, to: nil)
|
let nameTextFieldInWindow = profileHeaderView.nameTextField.superview!.convert(profileHeaderView.nameTextField.frame, to: nil)
|
||||||
let nameTextFieldTopToNavigationBarBottomOffset = containerSafeAreaInset.top - nameTextFieldInWindow.origin.y
|
let nameTextFieldTopToNavigationBarBottomOffset = containerSafeAreaInset.top - nameTextFieldInWindow.origin.y
|
||||||
|
|
|
@ -289,6 +289,12 @@ extension ProfileViewController {
|
||||||
bindPager()
|
bindPager()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override func viewWillAppear(_ animated: Bool) {
|
||||||
|
super.viewWillAppear(animated)
|
||||||
|
|
||||||
|
navigationController?.navigationBar.prefersLargeTitles = false
|
||||||
|
}
|
||||||
|
|
||||||
override func viewDidAppear(_ animated: Bool) {
|
override func viewDidAppear(_ animated: Bool) {
|
||||||
super.viewDidAppear(animated)
|
super.viewDidAppear(animated)
|
||||||
|
|
||||||
|
@ -374,7 +380,7 @@ extension ProfileViewController {
|
||||||
profileHeaderViewController.profileHeaderView.viewModel.$name
|
profileHeaderViewController.profileHeaderView.viewModel.$name
|
||||||
.receive(on: DispatchQueue.main)
|
.receive(on: DispatchQueue.main)
|
||||||
.sink { [weak self] name in
|
.sink { [weak self] name in
|
||||||
guard let self = self else { return }
|
guard let self = self, isModal == false else { return }
|
||||||
self.navigationItem.title = name
|
self.navigationItem.title = name
|
||||||
}
|
}
|
||||||
.store(in: &disposeBag)
|
.store(in: &disposeBag)
|
||||||
|
|
|
@ -33,10 +33,6 @@ class SuggestionAccountViewController: UIViewController, NeedsDependency {
|
||||||
}()
|
}()
|
||||||
|
|
||||||
override func viewDidLoad() {
|
override func viewDidLoad() {
|
||||||
|
|
||||||
setupNavigationBarAppearance()
|
|
||||||
defer { setupNavigationBarBackgroundView() }
|
|
||||||
|
|
||||||
super.viewDidLoad()
|
super.viewDidLoad()
|
||||||
|
|
||||||
title = L10n.Scene.SuggestionAccount.title
|
title = L10n.Scene.SuggestionAccount.title
|
||||||
|
@ -63,13 +59,14 @@ class SuggestionAccountViewController: UIViewController, NeedsDependency {
|
||||||
|
|
||||||
view.backgroundColor = .secondarySystemBackground
|
view.backgroundColor = .secondarySystemBackground
|
||||||
tableView.backgroundColor = .secondarySystemBackground
|
tableView.backgroundColor = .secondarySystemBackground
|
||||||
navigationController?.navigationBar.prefersLargeTitles = true
|
|
||||||
navigationItem.largeTitleDisplayMode = .always
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override func viewWillAppear(_ animated: Bool) {
|
override func viewWillAppear(_ animated: Bool) {
|
||||||
super.viewWillAppear(animated)
|
super.viewWillAppear(animated)
|
||||||
|
|
||||||
|
navigationController?.navigationBar.prefersLargeTitles = true
|
||||||
|
navigationItem.largeTitleDisplayMode = .automatic
|
||||||
|
|
||||||
tableView.deselectRow(with: transitionCoordinator, animated: animated)
|
tableView.deselectRow(with: transitionCoordinator, animated: animated)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -124,5 +121,3 @@ extension SuggestionAccountViewController: SuggestionAccountTableViewFooterDeleg
|
||||||
viewModel.followAllSuggestedAccounts(self)
|
viewModel.followAllSuggestedAccounts(self)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extension SuggestionAccountViewController: OnboardingViewControllerAppearance { }
|
|
||||||
|
|
Loading…
Reference in New Issue