forked from zelo72/mastodon-ios
fix: edit state overlay views display when push profile scene issue
This commit is contained in:
parent
78a444f14b
commit
526f125cb2
|
@ -220,6 +220,9 @@ extension ProfileHeaderViewController {
|
|||
super.viewDidAppear(animated)
|
||||
|
||||
viewModel.viewDidAppear.value = true
|
||||
|
||||
// set display after view appear
|
||||
profileHeaderView.setupAvatarOverlayViews()
|
||||
}
|
||||
|
||||
override func viewDidLayoutSubviews() {
|
||||
|
|
|
@ -144,7 +144,7 @@ extension ProfileHeaderViewModel {
|
|||
return html?.text
|
||||
}
|
||||
|
||||
// check if profile chagned or not
|
||||
// check if profile change or not
|
||||
func isProfileInfoEdited() -> Bool {
|
||||
guard isEditing.value else { return false }
|
||||
|
||||
|
|
|
@ -73,10 +73,15 @@ final class ProfileHeaderView: UIView {
|
|||
imageView.image = placeholderImage
|
||||
return imageView
|
||||
}()
|
||||
|
||||
func setupAvatarOverlayViews() {
|
||||
editAvatarBackgroundView.backgroundColor = UIColor.black.withAlphaComponent(0.6)
|
||||
editAvatarButton.tintColor = .white
|
||||
}
|
||||
|
||||
let editAvatarBackgroundView: UIView = {
|
||||
let view = UIView()
|
||||
view.backgroundColor = UIColor.black.withAlphaComponent(0.6)
|
||||
view.backgroundColor = .clear // set value after view appeared
|
||||
view.layer.masksToBounds = true
|
||||
view.layer.cornerCurve = .continuous
|
||||
view.layer.cornerRadius = ProfileHeaderView.avatarImageViewCornerRadius
|
||||
|
@ -87,7 +92,7 @@ final class ProfileHeaderView: UIView {
|
|||
let editAvatarButton: HighlightDimmableButton = {
|
||||
let button = HighlightDimmableButton()
|
||||
button.setImage(UIImage(systemName: "photo", withConfiguration: UIImage.SymbolConfiguration(pointSize: 28)), for: .normal)
|
||||
button.tintColor = .white
|
||||
button.tintColor = .clear
|
||||
return button
|
||||
}()
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ final class ProfileViewController: UIViewController, NeedsDependency, MediaPrevi
|
|||
|
||||
let refreshControl: UIRefreshControl = {
|
||||
let refreshControl = UIRefreshControl()
|
||||
refreshControl.tintColor = .label
|
||||
refreshControl.tintColor = .white
|
||||
return refreshControl
|
||||
}()
|
||||
|
||||
|
|
Loading…
Reference in New Issue