mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-12-24 14:02:53 +01:00
Optimise Status models for SwiftUI
This commit is contained in:
parent
ce41e6b000
commit
2a635eda21
@ -58,6 +58,14 @@ public struct Status: AnyStatus, Decodable, Identifiable, Equatable, Hashable {
|
||||
public var viewId: String {
|
||||
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 content: HTMLString
|
||||
@ -124,6 +132,14 @@ public struct ReblogStatus: AnyStatus, Decodable, Identifiable, Equatable, Hasha
|
||||
public var viewId: String {
|
||||
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 content: HTMLString
|
||||
|
Loading…
Reference in New Issue
Block a user