mirror of
https://github.com/metabolist/metatext.git
synced 2024-11-28 02:51:02 +00:00
Reduce view hierarchy manipulation
This commit is contained in:
parent
a12d2eb17d
commit
fbfebd240e
1 changed files with 2 additions and 3 deletions
|
@ -423,11 +423,10 @@ private extension StatusView {
|
||||||
viewModel.accountViewModel.displayName)
|
viewModel.accountViewModel.displayName)
|
||||||
|
|
||||||
sideStackView.isHidden = isContextParent
|
sideStackView.isHidden = isContextParent
|
||||||
avatarImageView.removeFromSuperview()
|
|
||||||
|
|
||||||
if isContextParent {
|
if isContextParent, avatarImageView.superview !== nameAccountContainerStackView {
|
||||||
nameAccountContainerStackView.insertArrangedSubview(avatarImageView, at: 0)
|
nameAccountContainerStackView.insertArrangedSubview(avatarImageView, at: 0)
|
||||||
} else {
|
} else if avatarImageView.superview !== sideStackView {
|
||||||
sideStackView.insertArrangedSubview(avatarImageView, at: 1)
|
sideStackView.insertArrangedSubview(avatarImageView, at: 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue