mirror of
https://github.com/MessageKit/MessageKit.git
synced 2026-02-06 19:03:19 +00:00
Improve equality checking on layout attributes
This commit is contained in:
@@ -82,3 +82,13 @@ public struct AvatarPosition {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// MARK: - Equatable Conformance
|
||||
|
||||
extension AvatarPosition: Equatable {
|
||||
|
||||
public static func == (lhs: AvatarPosition, rhs: AvatarPosition) -> Bool {
|
||||
return lhs.vertical == rhs.vertical && lhs.horizontal == rhs.horizontal
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -30,3 +30,13 @@ public struct LabelAlignment {
|
||||
public var textInsets: UIEdgeInsets
|
||||
|
||||
}
|
||||
|
||||
// MARK: - Equatable Conformance
|
||||
|
||||
extension LabelAlignment: Equatable {
|
||||
|
||||
public static func == (lhs: LabelAlignment, rhs: LabelAlignment) -> Bool {
|
||||
return lhs.textAlignment == rhs.textAlignment && lhs.textInsets == rhs.textInsets
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user