2
2
mirror of https://github.com/mastodon/mastodon-ios synced 2025-04-11 22:58:02 +02:00

fix: app enter background break profile header layout issue

This commit is contained in:
CMK 2022-05-13 17:26:57 +08:00
parent 3bdd9dc4aa
commit 8efaf38395

View File

@ -407,8 +407,14 @@ extension ProfileHeaderView {
override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
super.traitCollectionDidChange(previousTraitCollection)
updateLayoutMargins()
// workaround enter background breaking the layout issue
switch UIApplication.shared.applicationState {
case .active:
updateLayoutMargins()
default:
break
}
}
}