fix home screen conversation cell UI
This commit is contained in:
parent
b20e123bfd
commit
ce73cc7e98
|
@ -194,7 +194,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
|
|||
|
||||
func application(_ application: UIApplication, supportedInterfaceOrientationsFor window: UIWindow?) -> UIInterfaceOrientationMask {
|
||||
if UIDevice.current.isIPad {
|
||||
return .all
|
||||
return .allButUpsideDown
|
||||
}
|
||||
|
||||
return .portrait
|
||||
|
|
|
@ -149,7 +149,6 @@
|
|||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
</array>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<true/>
|
||||
|
|
|
@ -191,7 +191,7 @@ public final class FullConversationCell: UITableViewCell {
|
|||
|
||||
let labelContainerView = UIStackView(arrangedSubviews: [ topLabelStackView, bottomLabelStackView ])
|
||||
labelContainerView.axis = .vertical
|
||||
labelContainerView.alignment = .leading
|
||||
labelContainerView.alignment = .fill
|
||||
labelContainerView.spacing = 6
|
||||
labelContainerView.isUserInteractionEnabled = false
|
||||
|
||||
|
@ -207,12 +207,10 @@ public final class FullConversationCell: UITableViewCell {
|
|||
accentLineView.pin(.bottom, to: .bottom, of: contentView)
|
||||
timestampLabel.setContentCompressionResistancePriority(.required, for: NSLayoutConstraint.Axis.horizontal)
|
||||
|
||||
// HACK: The six lines below are part of a workaround for a weird layout bug
|
||||
topLabelStackView.set(.width, to: UIScreen.main.bounds.width - Values.accentLineThickness - profilePictureViewSize - 3 * Values.mediumSpacing)
|
||||
// HACK: The 4 lines below are part of a workaround for a weird layout bug
|
||||
topLabelStackView.set(.height, to: 20)
|
||||
topLabelSpacer.set(.height, to: 20)
|
||||
|
||||
bottomLabelStackView.set(.width, to: UIScreen.main.bounds.width - Values.accentLineThickness - profilePictureViewSize - 3 * Values.mediumSpacing)
|
||||
bottomLabelStackView.set(.height, to: 18)
|
||||
bottomLabelSpacer.set(.height, to: 18)
|
||||
|
||||
|
@ -224,12 +222,8 @@ public final class FullConversationCell: UITableViewCell {
|
|||
typingIndicatorView.pin(.leading, to: .leading, of: snippetLabelContainer)
|
||||
typingIndicatorView.centerYAnchor.constraint(equalTo: snippetLabel.centerYAnchor).isActive = true
|
||||
|
||||
stackView.pin(.leading, to: .leading, of: contentView)
|
||||
stackView.pin(.top, to: .top, of: contentView)
|
||||
|
||||
// HACK: The two lines below are part of a workaround for a weird layout bug
|
||||
stackView.set(.width, to: UIScreen.main.bounds.width - Values.mediumSpacing)
|
||||
stackView.set(.height, to: cellHeight)
|
||||
stackView.pin([ UIView.VerticalEdge.bottom, UIView.VerticalEdge.top, UIView.HorizontalEdge.leading ], to: contentView)
|
||||
stackView.pin(.trailing, to: .trailing, of: contentView, withInset: -Values.mediumSpacing)
|
||||
}
|
||||
|
||||
// MARK: - Content
|
||||
|
|
Loading…
Reference in New Issue