1
0
mirror of https://github.com/mastodon/mastodon-ios.git synced 2025-01-20 21:00:36 +01:00

Merge pull request #433 from mastodon/fix-profile-header-margin

Fix app enter background break profile header layout issue
This commit is contained in:
CMK 2022-05-13 18:33:07 +08:00 committed by GitHub
commit 3ff1e0f2ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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
}
}
}