Merge branch 'george/PR/compare-profiles' into master

This commit is contained in:
George Nachman 2022-02-02 09:46:15 -08:00
commit 520da1e000

View File

@ -54,6 +54,23 @@ public class OWSUserProfileBadgeInfo: NSObject, SDSSwiftSerializable {
}
return description
}
override public func isEqual(_ object: Any?) -> Bool {
guard let other = object as? OWSUserProfileBadgeInfo else {
return false
}
if badgeId != other.badgeId {
return false
}
// NOTE: We do not compare badges because the badgeId is good enough for equality purposes.
if expiration != other.expiration {
return false
}
if isVisible != other.isVisible {
return false
}
return true
}
}
@objc