EnesKaraosman / SwiftyChat

SwiftUI Chat UI (Client) Framework & Documentation to get started!
Apache License 2.0
284 stars 54 forks source link

When using alignToMessageTop, if the avatar and cell are the same height, it will not align. #34

Closed Eric1143 closed 1 year ago

Eric1143 commented 1 year ago
截屏2023-02-14 23 14 15

Suggest changing the code in AvatarModifier to...

public func body(content: Content) -> some View { HStack(alignment: avatarAlignment, spacing: avatarSpacing) { if !isSender { avatar.zIndex(2) } content if isSender { avatar.zIndex(2) } } }

private var avatarAlignment: VerticalAlignment { switch currentAvatarPosition { case .alignToMessageTop: return .top case .alignToMessageCenter: return .center case .alignToMessageBottom: return .bottom } }

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 1 year ago

This issue was closed because it has been inactive for 14 days since being marked as stale.