mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-12-16 20:26:37 +00:00
Fix Equatable impl for Status and Account (thanks class)
This commit is contained in:
parent
b643dda083
commit
5d3b378373
2 changed files with 14 additions and 3 deletions
|
@ -1,8 +1,19 @@
|
|||
import Foundation
|
||||
|
||||
public final class Account: Codable, Identifiable, Equatable, Hashable, Sendable {
|
||||
public final class Account: Codable, Identifiable, Hashable, Sendable, Equatable {
|
||||
public static func == (lhs: Account, rhs: Account) -> Bool {
|
||||
lhs.id == rhs.id
|
||||
lhs.id == rhs.id &&
|
||||
lhs.username == rhs.username &&
|
||||
lhs.note.asRawText == rhs.note.asRawText &&
|
||||
lhs.statusesCount == rhs.statusesCount &&
|
||||
lhs.followersCount == rhs.followersCount &&
|
||||
lhs.followingCount == rhs.followingCount &&
|
||||
lhs.acct == rhs.acct &&
|
||||
lhs.displayName == rhs.displayName &&
|
||||
lhs.fields == rhs.fields &&
|
||||
lhs.lastStatusAt == rhs.lastStatusAt &&
|
||||
lhs.discoverable == rhs.discoverable &&
|
||||
lhs.bot == rhs.bot
|
||||
}
|
||||
|
||||
public func hash(into hasher: inout Hasher) {
|
||||
|
|
|
@ -74,7 +74,7 @@ public final class Status: AnyStatus, Codable, Identifiable, Equatable, Hashable
|
|||
public var userMentioned: Bool?
|
||||
|
||||
public static func == (lhs: Status, rhs: Status) -> Bool {
|
||||
lhs.id == rhs.id
|
||||
lhs.id == rhs.id && lhs.viewId == rhs.viewId
|
||||
}
|
||||
|
||||
public func hash(into hasher: inout Hasher) {
|
||||
|
|
Loading…
Reference in a new issue