Merge pull request #433 from mastodon/fix-profile-header-margin
Fix app enter background break profile header layout issue
This commit is contained in:
commit
3ff1e0f2ff
|
@ -407,8 +407,14 @@ extension ProfileHeaderView {
|
||||||
|
|
||||||
override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
|
override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
|
||||||
super.traitCollectionDidChange(previousTraitCollection)
|
super.traitCollectionDidChange(previousTraitCollection)
|
||||||
|
|
||||||
updateLayoutMargins()
|
// workaround enter background breaking the layout issue
|
||||||
|
switch UIApplication.shared.applicationState {
|
||||||
|
case .active:
|
||||||
|
updateLayoutMargins()
|
||||||
|
default:
|
||||||
|
break
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue