mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-06 01:09:30 +00:00
Optimise Status models for SwiftUI
This commit is contained in:
parent
ce41e6b000
commit
2a635eda21
1 changed files with 16 additions and 0 deletions
|
@ -59,6 +59,14 @@ public struct Status: AnyStatus, Decodable, Identifiable, Equatable, Hashable {
|
||||||
id + createdAt + (editedAt ?? "")
|
id + createdAt + (editedAt ?? "")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static func == (lhs: Status, rhs: Status) -> Bool {
|
||||||
|
lhs.id == rhs.id
|
||||||
|
}
|
||||||
|
|
||||||
|
public func hash(into hasher: inout Hasher) {
|
||||||
|
hasher.combine(id)
|
||||||
|
}
|
||||||
|
|
||||||
public let id: String
|
public let id: String
|
||||||
public let content: HTMLString
|
public let content: HTMLString
|
||||||
public let account: Account
|
public let account: Account
|
||||||
|
@ -125,6 +133,14 @@ public struct ReblogStatus: AnyStatus, Decodable, Identifiable, Equatable, Hasha
|
||||||
id + createdAt + (editedAt ?? "")
|
id + createdAt + (editedAt ?? "")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static func == (lhs: ReblogStatus, rhs: ReblogStatus) -> Bool {
|
||||||
|
lhs.id == rhs.id
|
||||||
|
}
|
||||||
|
|
||||||
|
public func hash(into hasher: inout Hasher) {
|
||||||
|
hasher.combine(id)
|
||||||
|
}
|
||||||
|
|
||||||
public let id: String
|
public let id: String
|
||||||
public let content: HTMLString
|
public let content: HTMLString
|
||||||
public let account: Account
|
public let account: Account
|
||||||
|
|
Loading…
Reference in a new issue