1
0
mirror of https://github.com/metabolist/metatext synced 2024-12-27 18:22:32 +01:00

Reduce view hierarchy manipulation

This commit is contained in:
Justin Mazzocchi 2021-02-28 15:30:16 -08:00
parent a12d2eb17d
commit fbfebd240e
No known key found for this signature in database
GPG Key ID: E223E6937AAFB01C

View File

@ -423,11 +423,10 @@ private extension StatusView {
viewModel.accountViewModel.displayName)
sideStackView.isHidden = isContextParent
avatarImageView.removeFromSuperview()
if isContextParent {
if isContextParent, avatarImageView.superview !== nameAccountContainerStackView {
nameAccountContainerStackView.insertArrangedSubview(avatarImageView, at: 0)
} else {
} else if avatarImageView.superview !== sideStackView {
sideStackView.insertArrangedSubview(avatarImageView, at: 1)
}