Cleanup Mastodon+Entity+StatusEdit (IOS-175)

This commit is contained in:
Marcus Kida 2023-11-10 10:53:29 +01:00
parent 5fbecdab2d
commit 7d41820015
No known key found for this signature in database
GPG Key ID: 19FF64E08013CA40
2 changed files with 11 additions and 19 deletions

View File

@ -1,15 +0,0 @@
// Copyright © 2023 Mastodon gGmbH. All rights reserved.
import Foundation
import MastodonSDK
extension Mastodon.Entity.StatusEdit: Hashable, Equatable {
public func hash(into hasher: inout Hasher) {
hasher.combine(createdAt)
hasher.combine(content)
}
public static func == (lhs: Mastodon.Entity.StatusEdit, rhs: Mastodon.Entity.StatusEdit) -> Bool {
lhs.createdAt == rhs.createdAt && lhs.content == rhs.content
}
}

View File

@ -27,10 +27,6 @@ extension Mastodon.Entity {
}
public let options: [Option]
public let title: String?
// public static func == (lhs: Mastodon.Entity.StatusEdit.Poll, rhs: Mastodon.Entity.StatusEdit.Poll) -> Bool {
// lhs.title == rhs.title && lhs.options == rhs.options
// }
}
public let content: String
@ -55,3 +51,14 @@ extension Mastodon.Entity {
}
}
extension Mastodon.Entity.StatusEdit: Hashable, Equatable {
public func hash(into hasher: inout Hasher) {
hasher.combine(createdAt)
hasher.combine(content)
}
public static func == (lhs: Mastodon.Entity.StatusEdit, rhs: Mastodon.Entity.StatusEdit) -> Bool {
lhs.createdAt == rhs.createdAt && lhs.content == rhs.content
}
}